Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

s11n::string_tokenizer Class Reference

string_tokenizer is a... More...

#include <string_tokenizer.h>

List of all members.

Public Member Functions

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) (C) 1998 Waldo Bastian (bastian@kde.org)

Then this code was part of the QUB project: Copyright (C) 2000-2003 stephan beal (stephan@s11n.net) and Rusty Ballinger (bozo@users.sourceforge.net)

THIS code is part of the libessentials (a.k.a., elib): This copy is mainained by stephan@s11n.net i have explicit permission from the three original authors to release this code into the Public Domain, and this copy falls under that "license."

Definition at line 27 of file string_tokenizer.h.


Member Function Documentation

const char* s11n::string_tokenizer::next_token  ) 
 

Returns the next token in the list.

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

void s11n::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.)


The documentation for this class was generated from the following file:
Generated on Tue Oct 26 18:26:00 2004 for s11n by  doxygen 1.3.9.1