#include <StringTokenizer.h>

Public Member Functions | |
| TStringTokenizer (const IString &rData, const IString &rDelimiter, bool bRemoveEmptyTokens=false) | |
| TStringTokenizer (const IString &rData, const wchar_t *pwcDelimiter, bool bRemoveEmptyTokens=false) | |
| virtual | ~TStringTokenizer () |
| TString | getNextToken () const |
| TString | getToken (Int iTokenIndex) const |
| TString | getFirstToken () const |
| TString | getLastToken () const |
| void | getTokens (IStringList &rList) const |
| Int | getTokenCount () const |
| bool | hasNextToken () const |
| bool | hasToken (const IString &rToken) const |
| void | removeEmptyTokens () |
| void | resetIterator () |
| void | setTokens (const IStringList &rList) |
| TString | toString () const |
| TString | toString (TString strNewDelimiter) const |
| Retval | removeTokens (Int iFirstIndex, Int iLastIndex) |
| Retval | removeToken (Int uiIndex) |
| Retval | removeFirstToken () |
| Retval | removeLastToken () |
| Retval | getTokenIndex (const IString &strToken, Int &iIndex, bool bExactNotLike=true) |
| TStringTokenizer::TStringTokenizer | ( | const IString & | rData, | |
| const IString & | rDelimiter, | |||
| bool | bRemoveEmptyTokens = false | |||
| ) |
Creates a new tokenizer.
| rData | : Data to tokenize | |
| rDelimiter | : delimiter | |
| bRemoveEmptyTokens,: | Remove all empty token if this flag is set |
| TStringTokenizer::TStringTokenizer | ( | const IString & | rData, | |
| const wchar_t * | pwcDelimiter, | |||
| bool | bRemoveEmptyTokens = false | |||
| ) |
Creates a new tokenizer.
| rData | : Data to tokenize | |
| pwcDelimiter | : delimiter | |
| bRemoveEmptyTokens,: | Remove all empty token if this flag is set |
| TStringTokenizer::~TStringTokenizer | ( | ) | [virtual] |
Destroys the tokenizer
| TString zeus::TStringTokenizer::getNextToken | ( | ) | const [inline] |
returns the next token
| TString zeus::TStringTokenizer::getToken | ( | Int | iTokenIndex | ) | const [inline] |
returns a token by index.
| TString TStringTokenizer::getFirstToken | ( | ) | const |
Get the first token.
| TString TStringTokenizer::getLastToken | ( | ) | const |
Get the last token.
| void TStringTokenizer::getTokens | ( | IStringList & | rList | ) | const |
Returns a list of tokens. The list is a copy of the internal token list. Use set tokens to set a new token list
| rList | : Return parameter |
| Int zeus::TStringTokenizer::getTokenCount | ( | ) | const [inline] |
returns the number of the tokens
| bool zeus::TStringTokenizer::hasNextToken | ( | ) | const [inline] |
checks if there are more tokens
| bool zeus::TStringTokenizer::hasToken | ( | const IString & | rToken | ) | const [inline] |
checks if a token has been present
| void TStringTokenizer::removeEmptyTokens | ( | ) |
Remove all empty token
| void zeus::TStringTokenizer::resetIterator | ( | ) | [inline] |
resets the token iterator
| void TStringTokenizer::setTokens | ( | const IStringList & | rList | ) |
sets tokens to the internal token list
| rList | : New tokens |
| TString zeus::TStringTokenizer::toString | ( | ) | const [inline] |
This method returns the string builded from the tockens
Reimplemented from zeus::TZObject.
This method returns the string builded from the tockens and a delimiter
| Retval TStringTokenizer::removeTokens | ( | Int | iFirstIndex, | |
| Int | iLastIndex | |||
| ) |
Remove tokens given by a range of indexes.
| iFirstIndex | [IN]: First index of this range. | |
| iLastIndex | [IN]: Last index of this range. |
| : | Error code. |
| Retval TStringTokenizer::removeToken | ( | Int | iIndex | ) |
Remove a token given by index.
| iIndex | [IN]: Index of the token to be removed. |
| : | Error code. |
| Retval TStringTokenizer::removeFirstToken | ( | ) |
Remove the first token.
| Error code. |
| Retval TStringTokenizer::removeLastToken | ( | ) |
Remove the last token.
| Error code. |
| Retval TStringTokenizer::getTokenIndex | ( | const IString & | strToken, | |
| Int & | iIndex, | |||
| bool | bExactNotLike = true | |||
| ) |
Get the index of a given token.
| strToken | [IN] : The token to be searched for. | |
| uiIndex | [OUT]: Index of the first appearance of strToken. | |
| bExactNotLike | [IN] : true: strToken has to match one of the tokens stored in this tokenizer. |
| : | Error code. |