Tools.h++ Class Reference

Table Of Contents
Click on the banner to return to the Class Reference home page.
©Copyright 1996 Rogue Wave Software
RWWTokenizer
Synopsis
Description
Persistence
Example
Public Constructor
Public Member Function
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
#include <rw/wtoken.h>
#include <rw/rstream.h>
main(){
RWWString a(L"Something is rotten in the state of Denmark");