#include <xapian/visibility.h>
#include <algorithm>
#include <string>
#include <cstring>

Go to the source code of this file.
Namespaces | |
| namespace | Xapian |
| The Xapian namespace contains public interfaces for the Xapian library. | |
| namespace | Xapian::Internal |
Defines | |
| #define | STRINGIZE_(X) #X |
| Helper macro for STRINGIZE - the nested call is required because of how # works in macros. | |
| #define | STRINGIZE(X) STRINGIZE_(X) |
| The STRINGIZE macro converts its parameter into a string constant. | |
| #define | CONST_STRLEN(S) (sizeof(S"") - 1) |
| Returns the length of a string constant. | |
Functions | |
| bool | startswith (const std::string &s, char pfx) |
| bool | startswith (const std::string &s, const char *pfx, size_t len) |
| bool | startswith (const std::string &s, const char *pfx) |
| bool | startswith (const std::string &s, const std::string &pfx) |
| bool | endswith (const std::string &s, char sfx) |
| bool | endswith (const std::string &s, const char *sfx, size_t len) |
| bool | endswith (const std::string &s, const char *sfx) |
| bool | endswith (const std::string &s, const std::string &sfx) |
| std::string::size_type | common_prefix_length (const std::string &a, const std::string &b) |
| unsigned char | C_tab_ (char ch) |
| bool | C_isdigit (char ch) |
| bool | C_isxdigit (char ch) |
| bool | C_islcxdigit (char ch) |
| bool | C_isupper (char ch) |
| bool | C_islower (char ch) |
| bool | C_isalpha (char ch) |
| bool | C_isalnum (char ch) |
| bool | C_isspace (char ch) |
| bool | C_issign (char ch) |
| bool | C_isupdig (char ch) |
| bool | C_isnotdigit (char ch) |
| bool | C_isnotxdigit (char ch) |
| bool | C_isnotupper (char ch) |
| bool | C_isnotlower (char ch) |
| bool | C_isnotalpha (char ch) |
| bool | C_isnotalnum (char ch) |
| bool | C_isnotspace (char ch) |
| bool | C_isnotsign (char ch) |
| char | C_tolower (char ch) |
| char | C_toupper (char ch) |
Variables | |
| const unsigned char | Xapian::Internal::IS_DIGIT = 0x01 |
| const unsigned char | Xapian::Internal::IS_LOWER = 0x02 |
| const unsigned char | Xapian::Internal::IS_UPPER = 0x04 |
| const unsigned char | Xapian::Internal::IS_HEX = 0x08 |
| const unsigned char | Xapian::Internal::IS_SIGN = 0x10 |
| const unsigned char | Xapian::Internal::IS_SPACE = 0x20 |
Definition in file stringutils.h.
| #define CONST_STRLEN | ( | S | ) | (sizeof(S"") - 1) |
Returns the length of a string constant.
We rely on concatenation of string literals to produce an error if this macro is applied to something other than a string literal.
Definition at line 43 of file stringutils.h.
Referenced by FlintDatabaseReplicator::apply_changeset_from_conn(), ChertDatabaseReplicator::apply_changeset_from_conn(), FlintVersion::ensure_uuid(), FlintDatabase::get_changeset_revisions(), ChertDatabase::get_changeset_revisions(), BrassDatabase::get_changeset_revisions(), get_svnbranch(), and FlintVersion::read_and_check().
| #define STRINGIZE | ( | X | ) | STRINGIZE_(X) |
The STRINGIZE macro converts its parameter into a string constant.
Definition at line 36 of file stringutils.h.
Referenced by FlintWritableDatabase::add_document_(), ChertWritableDatabase::add_document_(), BrassWritableDatabase::add_document_(), Item_wr_::form_key(), Item_wr::form_key(), Brass::Item_wr::form_key(), FlintVersion::read_and_check(), ChertVersion::read_and_check(), BrassVersion::read_and_check(), RemoteDatabase::RemoteDatabase(), FlintWritableDatabase::replace_document(), ChertWritableDatabase::replace_document(), BrassWritableDatabase::replace_document(), show_usage(), FlintTable::split_root(), ChertTable::split_root(), and BrassTable::split_root().
| #define STRINGIZE_ | ( | X | ) | #X |
Helper macro for STRINGIZE - the nested call is required because of how # works in macros.
Definition at line 33 of file stringutils.h.
| bool C_isalnum | ( | char | ch | ) | [inline] |
Definition at line 167 of file stringutils.h.
References C_tab_(), Xapian::Internal::IS_DIGIT, Xapian::Internal::IS_LOWER, and Xapian::Internal::IS_UPPER.
Referenced by append_filename_argument(), C_isnotalnum(), and munge_term().
| bool C_isalpha | ( | char | ch | ) | [inline] |
Definition at line 162 of file stringutils.h.
References C_tab_(), Xapian::Internal::IS_LOWER, and Xapian::Internal::IS_UPPER.
Referenced by C_isnotalpha(), and U_isalpha().
| bool C_isdigit | ( | char | ch | ) | [inline] |
Definition at line 137 of file stringutils.h.
References C_tab_(), and Xapian::Internal::IS_DIGIT.
Referenced by C_isnotdigit(), munge_term(), and U_isdigit().
| bool C_islcxdigit | ( | char | ch | ) | [inline] |
Definition at line 147 of file stringutils.h.
References C_tab_(), Xapian::Internal::IS_HEX, and Xapian::Internal::IS_UPPER.
| bool C_islower | ( | char | ch | ) | [inline] |
Definition at line 157 of file stringutils.h.
References C_tab_(), and Xapian::Internal::IS_LOWER.
Referenced by C_isnotlower().
| bool C_isnotalnum | ( | char | ch | ) | [inline] |
| bool C_isnotalpha | ( | char | ch | ) | [inline] |
| bool C_isnotdigit | ( | char | ch | ) | [inline] |
| bool C_isnotlower | ( | char | ch | ) | [inline] |
| bool C_isnotsign | ( | char | ch | ) | [inline] |
| bool C_isnotspace | ( | char | ch | ) | [inline] |
Definition at line 193 of file stringutils.h.
References C_isspace().
Referenced by get_paragraph(), and FileIndexer::next().
| bool C_isnotupper | ( | char | ch | ) | [inline] |
| bool C_isnotxdigit | ( | char | ch | ) | [inline] |
| bool C_issign | ( | char | ch | ) | [inline] |
Definition at line 177 of file stringutils.h.
References C_tab_(), and Xapian::Internal::IS_SIGN.
Referenced by C_isnotsign().
| bool C_isspace | ( | char | ch | ) | [inline] |
Definition at line 172 of file stringutils.h.
References C_tab_(), and Xapian::Internal::IS_SPACE.
Referenced by C_isnotspace(), FileIndexer::next(), and stdout_to_string().
| bool C_isupdig | ( | char | ch | ) | [inline] |
Definition at line 182 of file stringutils.h.
References C_tab_(), Xapian::Internal::IS_DIGIT, and Xapian::Internal::IS_UPPER.
| bool C_isupper | ( | char | ch | ) | [inline] |
Definition at line 152 of file stringutils.h.
References C_tab_(), and Xapian::Internal::IS_UPPER.
Referenced by C_isnotupper(), Xapian::U_isupper(), and U_isupper().
| bool C_isxdigit | ( | char | ch | ) | [inline] |
Definition at line 142 of file stringutils.h.
References C_tab_(), and Xapian::Internal::IS_HEX.
Referenced by C_isnotxdigit(), and munge_term().
| unsigned char C_tab_ | ( | char | ch | ) | [inline] |
Definition at line 132 of file stringutils.h.
References Xapian::Internal::is_tab.
Referenced by C_isalnum(), C_isalpha(), C_isdigit(), C_islcxdigit(), C_islower(), C_issign(), C_isspace(), C_isupdig(), C_isupper(), and C_isxdigit().
| char C_tolower | ( | char | ch | ) | [inline] |
Definition at line 196 of file stringutils.h.
References Xapian::Internal::lo_tab.
Referenced by munge_term().
| char C_toupper | ( | char | ch | ) | [inline] |
| std::string::size_type common_prefix_length | ( | const std::string & | a, | |
| const std::string & | b | |||
| ) | [inline] |
Definition at line 94 of file stringutils.h.
Referenced by FlintTermListTable::set_termlist(), ChertTermListTable::set_termlist(), and BrassTermListTable::set_termlist().
| bool endswith | ( | const std::string & | s, | |
| const std::string & | sfx | |||
| ) | [inline] |
| bool endswith | ( | const std::string & | s, | |
| const char * | sfx | |||
| ) | [inline] |
| bool endswith | ( | const std::string & | s, | |
| const char * | sfx, | |||
| size_t | len | |||
| ) | [inline] |
Definition at line 76 of file stringutils.h.
| bool endswith | ( | const std::string & | s, | |
| char | sfx | |||
| ) | [inline] |
Definition at line 70 of file stringutils.h.
Referenced by endswith(), test_driver::get_srcdir(), main(), FileIndexer::next_file(), and Xapian::StringValueRangeProcessor::operator()().
| bool startswith | ( | const std::string & | s, | |
| const std::string & | pfx | |||
| ) | [inline] |
| bool startswith | ( | const std::string & | s, | |
| const char * | pfx | |||
| ) | [inline] |
| bool startswith | ( | const std::string & | s, | |
| const char * | pfx, | |||
| size_t | len | |||
| ) | [inline] |
Definition at line 52 of file stringutils.h.
| bool startswith | ( | const std::string & | s, | |
| char | pfx | |||
| ) | [inline] |
Definition at line 46 of file stringutils.h.
Referenced by FlintDatabaseReplicator::apply_changeset_from_conn(), ChertDatabaseReplicator::apply_changeset_from_conn(), BrassDatabaseReplicator::apply_changeset_from_conn(), TermGroup::as_group(), DEFINE_TESTCASE(), test_driver::get_srcdir(), get_svnbranch(), FlintMetadataTermList::get_termname(), ChertMetadataTermList::get_termname(), BrassMetadataTermList::get_termname(), main(), InMemoryAllTermsList::next(), FlintSynonymTermList::next(), FlintSpellingWordsList::next(), FlintMetadataTermList::next(), FlintAllTermsList::next(), ChertSynonymTermList::next(), ChertSpellingWordsList::next(), ChertMetadataTermList::next(), ChertAllTermsList::next(), BrassSynonymTermList::next(), BrassSpellingWordsList::next(), BrassMetadataTermList::next(), BrassAllTermsList::next(), AuthorValueRangeProcessor::operator()(), Xapian::StringValueRangeProcessor::operator()(), skip_test_for_backend(), skip_test_unless_backend(), InMemoryAllTermsList::skip_to(), FlintSynonymTermList::skip_to(), FlintSpellingWordsList::skip_to(), FlintMetadataTermList::skip_to(), FlintAllTermsList::skip_to(), ChertSynonymTermList::skip_to(), ChertSpellingWordsList::skip_to(), ChertMetadataTermList::skip_to(), ChertAllTermsList::skip_to(), BrassSynonymTermList::skip_to(), BrassSpellingWordsList::skip_to(), BrassMetadataTermList::skip_to(), BrassAllTermsList::skip_to(), startswith(), and TestRunner::use_backend().