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

RWWTokenizer

Module:  Essential Tools Module   Group:  String Processing


Does not inherit

Local Index

Members

Synopsis

#include <rw/wtoken.h>
RWWString str("a string of tokens", RWWString::ascii);
RWWTokenizer(str);  // Lex the above string

Description

Class RWWTokenizer is designed to break a string up into separate tokens, delimited by arbitrary "white space." It can be thought of as an iterator for strings and as an alternative to the C library function wstok() which has the unfortunate side effect of changing the string being tokenized.

Persistence

None

Example

Program output:

Public Constructor

RWWTokenizer(const RWWString& s);

Public Member Function

RWWSubString
operator();
RWWSubString
operator()(const wchar_t* s);
RWWSubString
operator()(const wchar_t* s,size_t num);
RWWString
operator()(RWTRegex<char>& regex);

Public Member Functions

boolean
done() const
RWWString
nextToken()
RWWString
nextToken(const RWWString& str)
RWWString 
nextToken(const RWWString& str, size_t num);
RWWString
nextToken(RWTRegex<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.