90 StringTokenizer(std::string tosplit, std::string token,
bool splitAtAllChars =
false);
121 std::string
get(
int pos)
const;
127 std::set<std::string>
getSet();
131 void prepare(
const std::string& tosplit,
const std::string& token,
bool splitAtAllChars);
static const int NEWLINE
identifier for splitting the given string at all newline characters
std::string front()
returns the first substring without moving the iterator
std::set< std::string > getSet()
return set of strings
~StringTokenizer()
destructor
int size() const
returns the number of existing substrings
SizeVector myStarts
the list of substring starts
void reinit()
reinitialises the internal iterator
static const int WHITECHARS
identifier for splitting the given string at all whitespace characters
std::string get(int pos) const
returns the item at the given position
std::vector< std::string > getVector()
return vector of strings
std::vector< int > SizeVector
a list of positions/lengths
bool hasNext()
returns the information whether further substrings exist
static const int TAB
the ascii index of the tab character
static const int SPACE
the ascii index of the highest whitespace character
SizeVector myLengths
the list of substring lengths
StringTokenizer()
default constructor
int myPos
the current position in the list of substrings
void prepare(const std::string &tosplit, const std::string &token, bool splitAtAllChars)
splits the first string at all occurrences of the second. If the third parameter is true split at all...
std::string myTosplit
the string to split
void prepareWhitechar(const std::string &tosplit)
splits the first string at all occurrences of whitechars
std::string next()
returns the next substring when it exists. Otherwise the behaviour is undefined