Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide

RWCTokenizer

Module:  Essential Tools Module   Group:  String Processing


Does not inherit

Local Index

Members

Synopsis

#include <rw/ctoken.h>
RWCString str("a string of tokens");
RWCTokenizer(str);  // Lex the above string

Description

Class RWCTokenizer is designed to break a string up into separate tokens, delimited by an arbitrary white space. Think of it as an iterator for strings and as an alternative to the ANSI C function strtok() which has the unfortunate side effect of changing the tokenized string.

Persistence

None

Example

Program output:

Public Constructor

RWCTokenizer(const RWCString& s);

Public Member Operators

RWCSubString
operator()();
RWCSubString
operator()(const char* s);
RWCSubString
operator()(const char* s,size_t num);
RWCString
operator()(RWTRegex<char>& regex);

Public Member Functions

boolean
done() const
RWCString
nextToken()
RWCString
nextToken(const RWCString& str)
RWCString 
nextToken(const RWCString& str, size_t num);
RWCString
nextToken(TRegex<char>& regex);


Previous fileTop of DocumentContentsIndex pageNext file

©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.