Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

skStringTokenizer Class Reference

The string tokenizer class allows an application to break a string into tokens. More...

#include <skStringTokenizer.h>

Inheritance diagram for skStringTokenizer:

List of all members.

Public Member Functions

 skStringTokenizer ()
 Constructor.

virtual ~skStringTokenizer ()
 Desstructor.

IMPORT_C void init (const skString &str, const skString &delim, bool returnDelims)
 Initialize the tokenizer.

void init (const skString &str, const TDesC &delim, bool returnDelims)
 Initialize the tokenizer.

IMPORT_C bool hasMoreTokens ()
 Tests if there are more tokens available from this tokenizer's string.

IMPORT_C skString nextToken ()
 Returns the next token from this string tokenizer.

IMPORT_C skString nextToken (const skString &delim)
 Returns the next token in this string tokenizer's string.

IMPORT_C int countTokens ()
 Calculates the number of times that this tokenizer's nextToken method can be called.


Detailed Description

The string tokenizer class allows an application to break a string into tokens.


Member Function Documentation

IMPORT_C int skStringTokenizer::countTokens  ) 
 

Calculates the number of times that this tokenizer's nextToken method can be called.

The current position is not advanced.

Returns:
the number of tokens remaining in the string using the current delimiter set.

IMPORT_C bool skStringTokenizer::hasMoreTokens  ) 
 

Tests if there are more tokens available from this tokenizer's string.

If this method returns true, then a subsequent call to nextToken with no argument will successfully return a token.

Returns:
true if and only if there is at least one token in the string after the current position; false otherwise.

void skStringTokenizer::init const skString str,
const TDesC &  delim,
bool  returnDelims
[inline]
 

Initialize the tokenizer.

Remarks:
only available in Symbian version
Parameters:
str a string to be parsed.
delim the delimiters.
returnDelims flag indicating whether to return the delimiters as tokens.
Exceptions:
Symbian - a leaving function

IMPORT_C void skStringTokenizer::init const skString str,
const skString delim,
bool  returnDelims
 

Initialize the tokenizer.

Parameters:
str a string to be parsed.
delim the delimiters.
returnDelims flag indicating whether to return the delimiters as tokens.
Exceptions:
Symbian - a leaving function

IMPORT_C skString skStringTokenizer::nextToken const skString delim  ) 
 

Returns the next token in this string tokenizer's string.

First, the set of characters considered to be delimiters by this skStringTokenizer object is changed to be the characters in the string delim. Then the next token in the string after the current position is returned. The current position is advanced beyond the recognized token. The new delimiter set remains the default after this call.

Parameters:
delim the new delimiters.
Returns:
the next token, after switching to the new delimiter set.
Exceptions:
Symbian - a leaving function

IMPORT_C skString skStringTokenizer::nextToken  ) 
 

Returns the next token from this string tokenizer.

Returns:
the next token from this string tokenizer.
Exceptions:
Symbian - a leaving function


The documentation for this class was generated from the following file:
Generated on Fri Dec 17 20:28:27 2004 for Simkin C++ for Symbian by doxygen1.3