Inheritance diagram for Exponent::Basics::CStringTokeniser:
CStringTokeniser tokeniser("hello, everybody"); while(tokeniser.hasMoreTokens()) { // Get the token char *token = tokeniser.getNextToken(); // Display the token std::cout << "Token is = " << token << std::endl; // Delete the token buffer FREE_ARRAY_POINTER(token); }
Definition at line 47 of file CStringTokeniser.hpp.
Exponent::Basics::CStringTokeniser::CStringTokeniser | ( | const char * | string | ) |
Construction
string | The string to tokenise |
Exponent::Basics::CStringTokeniser::CStringTokeniser | ( | const CString & | string | ) |
Construction
string | The string to tokenise |
Exponent::Basics::CStringTokeniser::CStringTokeniser | ( | const char * | string, | |
const char | token | |||
) |
Construction
string | The string to tokenise | |
token | The token to split on |
Exponent::Basics::CStringTokeniser::CStringTokeniser | ( | const CString & | string, | |
const char | token | |||
) |
Construction
string | The string to tokenise | |
token | The token to split on |
virtual Exponent::Basics::CStringTokeniser::~CStringTokeniser | ( | ) | [virtual] |
Destruction
bool Exponent::Basics::CStringTokeniser::getNextToken | ( | CString & | string | ) |
Get the next token
string | On return holds the token |
bool | true if got the next token, false otherwise |
virtual char* Exponent::Basics::CStringTokeniser::getNextToken | ( | ) | [virtual] |
Get the next token
char* | The next token available. You are responsible for its deletion |
virtual long Exponent::Basics::CStringTokeniser::getNumberOfTokens | ( | ) | [virtual] |
Get the number of tokens in the string
long | The number of tokens |
virtual bool Exponent::Basics::CStringTokeniser::hasMoreTokens | ( | ) | [virtual] |
Are there more tokens available to iterate over?
bool | True if more tokens available, false otherwise |
virtual void Exponent::Basics::CStringTokeniser::setStringToTokenize | ( | const char * | string | ) | [virtual] |
Set the string to be tokenised
string | The string to tokenise |
virtual void Exponent::Basics::CStringTokeniser::setTokenizationCharacter | ( | const char | token | ) | [virtual] |
Set the character to split on
token | The character to split on |
const long Exponent::Basics::CStringTokeniser::CSTRING_TOKENISER_MAX_STRING = 2048 [static] |
Max length string that you can use
Definition at line 59 of file CStringTokeniser.hpp.
long Exponent::Basics::CStringTokeniser::m_lastTokenPosition [protected] |
index of last token
Definition at line 145 of file CStringTokeniser.hpp.
long Exponent::Basics::CStringTokeniser::m_numberOfTokens [protected] |
the tokens
Definition at line 143 of file CStringTokeniser.hpp.
long Exponent::Basics::CStringTokeniser::m_numberOfTokensReturned [protected] |
no returned
Definition at line 144 of file CStringTokeniser.hpp.
char Exponent::Basics::CStringTokeniser::m_string[CSTRING_TOKENISER_MAX_STRING] [protected] |
the tokenisation string
Definition at line 146 of file CStringTokeniser.hpp.
char Exponent::Basics::CStringTokeniser::m_token [protected] |
the token
Definition at line 147 of file CStringTokeniser.hpp.