Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWWTokenizer

Module:  Essential Tools Module   Group:  String Processing Classes


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 (assuming your platform displays wide characters as ASCII if they are in the ASCII character set):

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

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, 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.