namespace Akenti class StringTokenizer

This a simple string tokenizer

Public Methods

StringTokenizer (const string& source, const string& delimiters = "\t\n\r\f ", bool retTokens = false)
Constructs this object
bool hasMoreTokens ()
Returns true if the tokenizer has more tokens
string nextToken ()
Returns the next token
string nextToken (const string& delimiters)
Returns the next token
string paramString () const
Prints the data members for StringTokenizer using the format [nameOfDataMember="valueOfDataMember",

Documentation

This a simple string tokenizer.
StringTokenizer(const string& source, const string& delimiters = "\t\n\r\f ", bool retTokens = false)
Constructs this object. The default deimiters are any white space characters. By default the delimiters are not returned as tokens.
Parameters:
source - string to be parsed
delimiters - the set of delimiters used to parse the stream
retTokens - if true the delimiters are returned as a token, if false they are not.

bool hasMoreTokens()
Returns true if the tokenizer has more tokens.
Returns:
true if there are more tokens, false otherwise

string nextToken()
Returns the next token.
Throws:
Error if there are no more tokens
Returns:
the next token

string nextToken(const string& delimiters)
Returns the next token. The new set of delimiters replaces the old one.
Throws:
Error if there are no more tokens
Returns:
the next token
Parameters:
delimiters - the new set of delimiters use to parse the stream
See Also:
nextToken()

string paramString() const
Prints the data members for StringTokenizer using the format [nameOfDataMember="valueOfDataMember",...]
Returns:
the string format as shown above


This class has no child classes.
Author:
Srilekha Mudumbai Abdelilah Essiari
Version:
1.1 00/05/01

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de