s11n::io::strtool::string_tokenizer Class Reference

string_tokenizer is a. More...

#include <strtool.hpp>

List of all members.

Public Member Functions

 string_tokenizer ()
 ~string_tokenizer ()
void tokenize (const char *sequence, const char *separator)
 Sets the token list and separator to be used by subsequent next_token() calls.
const char * next_token ()
 Returns the next token in the list.
bool has_tokens ()
 Returns true if this object has another token to return via next_token().


Detailed Description

string_tokenizer is a.

.. well, a string tokenizer, modelled after Java's java.util.string_tokenizer class.

This code used to be part of the KDE 1.x libraries: (named StringTokenizer)

Copyright (C) 1997 Martin Jones (mjones@kde.org), (C) 1997 Torben Weis (weis@kde.org), and (C) 1998 Waldo Bastian (bastian@kde.org)

Then this code was part of the QUB project:

Copyright (C) 2000-2003 stephan beal (sgbeal@users.sourceforge.net) and Rusty Ballinger (bozo@users.sourceforge.net)

THIS code is part of the s11n project, and is maintained by stephan@s11n.net. i have been graciously granted explicit permission from the three original authors to release this code into the Public Domain, and this copy falls under that "license." (The original license was GNU GPL.)

Definition at line 455 of file strtool.hpp.


Constructor & Destructor Documentation

s11n::io::strtool::string_tokenizer::string_tokenizer (  ) 

s11n::io::strtool::string_tokenizer::~string_tokenizer (  ) 


Member Function Documentation

void s11n::io::strtool::string_tokenizer::tokenize ( const char *  sequence,
const char *  separator 
)

Sets the token list and separator to be used by subsequent next_token() calls.

It is important that the strings not be destroyed/freed by the client before this object is done with them. That is, do not call tokenize(), then free the strings, then call has_tokens() or next_token(). (In practice, this has never happened.)

const char* s11n::io::strtool::string_tokenizer::next_token (  ) 

Returns the next token in the list.

Results are undefined if this method is called when has_tokens() returns false.

bool s11n::io::strtool::string_tokenizer::has_tokens (  ) 

Returns true if this object has another token to return via next_token().


The documentation for this class was generated from the following file:
Generated on Sun Apr 27 13:16:05 2008 for libs11n by  doxygen 1.5.3