[Xapian-discuss] Semantics of terms - do they have to be C style, '\0' terminated strings?
David Spencer
david.spencerian at gmail.com
Thu Sep 11 07:21:53 BST 2008
Briefly: my goal is to index a series of 64 bit numeric values with every
document.
I see that WritableDocument::add_term takes a C++ string argument.
I believe that C++ strings allow bytes with a value of 0x0 (or '\0'),
however I'm pretty
sure that all is lost if you then call string.c_str().
Is it defined anywhere whether the string you pass to add_term has to be "C
style" or not?
At a glance the code base doesn't call c_str() much and the cases I saw had
to do with filenames, so this might be OK,
I just wanted to check if this was, say, guaranteed by the contract or if
this is just too dubious.
thx
Dave
More information about the Xapian-discuss
mailing list