#include <string_tokenizer.h>
define TOKENIZER_USES_VECTOR_BOOL if you want to use vector<bool> in tokenizer. It must work faster with it, but it does not. The Reenterable replacement of strtok().
Usage:
char *text = "word, word2;word3" StringTokenizer token(text, " ,;"); const char *word; while((word = token())){ handle token here }
The Reenterable replacement of strtok().
Usage:
char *text = "word, word2;word3" StringTokenizer token(text, " ,;"); const char *word; while((word = token())){ handle token here }
StringTokenizer::StringTokenizer | ( | const char * | _text, | |
const char * | _delims | |||
) | [inline] |
StringTokenizer::~StringTokenizer | ( | ) | [inline] |
References text_ptr.
StringTokenizer::StringTokenizer | ( | const char * | _text, | |
const char * | _delims | |||
) |
StringTokenizer::~StringTokenizer | ( | ) |
bool StringTokenizer::is_delim | ( | char | ch | ) | [inline, private] |
const char * StringTokenizer::operator() | ( | ) | [inline] |
References _val, i, is_delim(), and text.
Referenced by next_token().
string StringTokenizer::next_token | ( | ) | [inline] |
const char* StringTokenizer::get_rest | ( | ) | [inline] |
References text.
char* StringTokenizer::val | ( | ) | [inline] |
References _val.
Referenced by TItemContainer::BuildDomens(), TItemContainer::BuildDomItems(), TItemContainer::BuildFields(), TItemContainer::BuildOneFieldFormat(), MorphoWizard::load_wizard(), CConcIndexator::LoadOptionsFromString(), mkdirhier(), parse_gra_descriptors(), CHomonym::ProcessLemmaAndGrammems(), CAgramtab::ProcessPOSAndGrammems(), CHighlightTags::ReadFromString(), TRoss::ReadFromStrWithOneSignatura(), and CHitBorders::RegisterBorderIndices().
int StringTokenizer::count | ( | ) | [inline] |
References i.
bool StringTokenizer::has_next | ( | ) | [inline] |
References text.
bool StringTokenizer::is_delim | ( | char | ch | ) | const [private] |
References delims.
void StringTokenizer::initialize | ( | const char * | _text, | |
const char * | _delims | |||
) | [private] |
References delims, i, text, and text_ptr.
Referenced by reinitialize().
const char* StringTokenizer::operator() | ( | ) |
string StringTokenizer::next_token | ( | ) |
const char * StringTokenizer::get_rest | ( | ) | const |
References text.
const char * StringTokenizer::val | ( | ) | const |
References _val.
int StringTokenizer::count | ( | ) | const |
References i.
bool StringTokenizer::has_next | ( | ) | const |
References text.
void StringTokenizer::reinitialize | ( | const char * | _text, | |
const char * | _delims | |||
) |
char * StringTokenizer::text_ptr [private] |
Referenced by initialize(), reinitialize(), StringTokenizer(), and ~StringTokenizer().
char * StringTokenizer::text [private] |
Referenced by get_rest(), has_next(), initialize(), operator()(), and StringTokenizer().
int StringTokenizer::i [private] |
Referenced by count(), initialize(), and operator()().
string StringTokenizer::delims [private] |
Referenced by initialize(), and is_delim().
char * StringTokenizer::_val [private] |
Referenced by operator()(), and val().