#include <StringTokenizer.h>
List of all members.
Detailed Description
This class implements a tokenizer for strings
Constructor & Destructor Documentation
| TStringTokenizer::TStringTokenizer |
( |
const IString & |
rData, |
|
|
const IString & |
rDelimiter, |
|
|
bool |
bRemoveEmptyTokens = false |
|
) |
| |
Creates a new tokenizer.
- Parameters:
-
| 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.
- Parameters:
-
| rData | : Data to tokenize |
| pwcDelimiter | : delimiter |
| bRemoveEmptyTokens,: | Remove all empty token if this flag is set |
| TStringTokenizer::~TStringTokenizer |
( |
) |
[virtual] |
Member Function Documentation
| TString zeus::TStringTokenizer::getFirstToken |
( |
) |
const [inline] |
Get the first token.
- Returns:
- first token
| TString zeus::TStringTokenizer::getLastToken |
( |
) |
const [inline] |
Get the last token.
- Returns:
- last token
| TString zeus::TStringTokenizer::getNextToken |
( |
) |
const [inline] |
| TString zeus::TStringTokenizer::getToken |
( |
Int |
iTokenIndex ) |
const [inline] |
returns a token by index.
- Parameters:
-
| iTokenIndex | : index of the token |
- Returns:
- indexed token
| Int zeus::TStringTokenizer::getTokenCount |
( |
) |
const [inline] |
returns the number of the tokens
| Retval TStringTokenizer::getTokenIndex |
( |
const IString & |
strToken, |
|
|
Int & |
iIndex, |
|
|
bool |
bExactNotLike = true |
|
) |
| |
Get the index of a given token.
- Parameters:
-
| strToken | [IN] : The token to be searched for. |
| iIndex | [OUT]: Index of the first appearance of strToken. |
| bExactNotLike | [IN] : true: strToken has to match one of the tokens stored in this tokenizer. |
false: strToken only has to be contained at the beginning of one of the tokens of this tokenizer.
- Returns:
- Error code.
| void zeus::TStringTokenizer::getTokens |
( |
IStringList & |
rList ) |
const [inline] |
Returns a list of tokens. The list is a copy of the internal token list. Use set tokens to set a new token list
- Parameters:
-
| 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 |
( |
) |
|
| Retval zeus::TStringTokenizer::removeFirstToken |
( |
) |
[inline] |
Remove the first token.
- Returns:
- Error code.
| Retval zeus::TStringTokenizer::removeLastToken |
( |
) |
[inline] |
Remove the last token.
- Returns:
- Error code.
| Retval TStringTokenizer::removeToken |
( |
Int |
iIndex ) |
|
Remove a token given by index.
- Parameters:
-
| iIndex | [IN]: Index of the token to be removed. |
- Returns:
- Error code.
| Retval TStringTokenizer::removeTokens |
( |
Int |
iFirstIndex, |
|
|
Int |
iLastIndex |
|
) |
| |
Remove tokens given by a range of indexes.
- Parameters:
-
| iFirstIndex | [IN]: First index of this range. |
| iLastIndex | [IN]: Last index of this range. |
- Returns:
- Error code.
| void zeus::TStringTokenizer::resetIterator |
( |
) |
[inline] |
resets the token iterator
| void zeus::TStringTokenizer::setTokens |
( |
const IStringList & |
rList ) |
[inline] |
sets tokens to the internal token list
- Parameters:
-
| TString zeus::TStringTokenizer::toString |
( |
) |
const [inline] |
This method returns the string builded from the tockens
- Returns:
- build string out of tokens
Reimplemented from zeus::TZObject.
| TString zeus::TStringTokenizer::toString |
( |
TString |
strNewDelimiter ) |
const [inline] |
This method returns the string builded from the tockens and a delimiter
- Parameters:
-
| strNewDelimiter | : new delimiter to use |
- Returns:
- build string out of tokens
The documentation for this class was generated from the following files: