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

RWClassicWString

Module:  Essential Tools Module   Group:  String Processing


Does not inherit

Local Index

Members

Non-Members

Synopsis

#include <rw/tools/nostl/wstring.h>

Description

RWClassicWString is an alternate implementation of RWWString, but does not depend on the C++ Standard Library. RWWString is a typedef for RWClassicWString if you define a non-Standard Library build.


NOTE -- Rogue Wave does not support non-Standard Library builds.

For more information on how to use this class, see the Description section of RWWString in this reference guide.

Persistence

Simple

Example

Program output:

There is no joy in Redmond.

Enumerations

enum stripType   
               {leading = 0x1, trailing = 0x2, both = 0x3};
enum RWClassicWString::caseCompare 
               { exact, ignoreCase, ignoreCaseStrict };
enum scopeType   {one, all};
enum RWClassicWString::multiByte_ { multiByte };
enum RWClassicWString::ascii_ {ascii };

Public Constructors

RWClassicWString();
RWClassicWString(wchar_t);
RWClassicWString(const wchar_t* cs);
RWClassicWString(const wchar_t* cs, size_t N);
RWClassicWString(RWSize_T ic);
RWClassicWString(const RWClassicWString& str); 
RWClassicWString(const RWClassicWSubString& ss);
RWClassicWString(char c);
RWClassicWString(char c, size_t N);
RWClassicWString(const char* mbcs, multiByte_ mb);
RWClassicWString(const RWClassicCString& cstr, multiByte_);
RWClassicWString(const char* mbcs, size_t N, multiByte_ mb)
RWClassicWString(const char* acs, ascii_ asc);
RWClassicWString(const RWClassicCString&, ascii_);
RWClassicWString(const char* cs, size_t N, ascii_ asc);

Type Conversion

operator
const wchar_t*() const 

Assignment Operators

RWClassicWString&
operator=(const wchar_t*);
RWClassicWString&
operator=(const RWClassicWString&);
RWClassicWString&
operator+=(const wchar_t*); 
RWClassicWString&
operator+=(const RWClassicWString& s);

Indexing Operators

wchar_t&
operator[](short i); 
wchar_t&            
operator[](int i);
  wchar_t&            
operator[](long i);
  wchar_t&            
operator[](unsigned short i);
  wchar_t&            
operator[](unsigned int i);
  wchar_t&            
operator[](unsigned long i);
wchar_t             
operator[](short i)           const;
wchar_t             
operator[](int i)             const;
wchar_t             
operator[](long i)            const;
wchar_t             
operator[](unsigned short i)  const;
wchar_t             
operator[](unsigned int i)    const;
wchar_t             
operator[](unsigned long i)   const;
wchar_t&
operator()(size_t i); 
wchar_t
operator()(size_t i) const;
RWClassicWSubString
operator()(size_t start, size_t len); 
const RWClassicWSubString
operator()(size_t start, size_t len) const;

Public Member Functions

RWClassicWString&
append(const wchar_t* cs); 
RWClassicWString&
append(const wchar_t* cs, size_t N,);
RWClassicWString&
append(const RWClassicWString& s);
RWClassicWString&
append(const RWClassicWString& s, size_t N);
RWClassicWString&    
append(wchar_t c, size_t rep=1);        
size_t
binaryStoreSize() const; 
size_t
capacity() const; 
size_t
capacity(size_t N); 
int
collate(const RWClassicWString& str) const; 
int
collate(const wchar_t* str) const 
int
compareTo(const RWClassicWString& str, 
          caseCompare RWClassicWString::exact) const
int  
compareTo(const RWClassicWString* str, 
          caseCompare RWClassicWString::exact)
int
compareTo(const wchar_t* cs,   
          caseCompare cmp = exact) const
RWBoolean
contains(const wchar_t* cs,   
         caseCompare cmp = exact) const;RWBoolean
contains(const RWClassicWString& str, 
         caseCompare RWClassicWString::exact) const;
const wchar_t*
data() const; 
size_t
first(wchar_t c) const; 
size_t   
first(wchar_t c,size_t i) const
size_t
first(const wchar_t* cs) const;
size_t
first(const wchar_t* cs, size_t N) const;
unsigned
hash(caseCompare cmp = exact) const; 
size_t
index(const wchar_t* pat, size_t i=0, 
      caseCompare cmp = exact) const;
size_t
index(const RWClassicWString& pat,size_t i=0, 
      caseCompare cmp = exact) const;
size_t
index(const wchar_t* pat, size_t patlen,size_t i, 
      caseCompare cmp) const;
size_t
index(const RWClassicWString& s, size_t patlen,size_t i, 
      caseCompare) const;
RWClassicWString&
insert(size_t pos, const wchar_t* cs); 
RWClassicWString&
insert(size_t pos, const wchar_t* cs, size_t N);
RWClassicWString&
insert(size_t pos, const RWClassicWString& str);
RWClassicWString&
insert(size_t pos, const RWClassicWString& str, size_t N);
RWBoolean
isAscii() const; 
RWBoolean
isNull() const; 
size_t
last(wchar_t c) const; 
size_t
length() const; 
RWClassicWString&
prepend(const wchar_t* cs); 
RWClassicWString&
prepend(const wchar_t* cs, size_t N,);
RWClassicWString&
prepend(const RWClassicWString& str);
RWClassicWString&
prepend(const RWClassicWString& cstr, size_t N);
istream&
readFile(istream& s); 
istream&
readLine(istream& s, RWBoolean skipWhite = TRUE); 
istream&
readString(istream& s); 
istream&
readToDelim(istream&, wchar_t delim=(wchar_t)'\n'); 
istream&
readToken(istream& s); 
RWClassicWString&
remove(size_t pos); 
RWClassicWString&
remove(size_t pos, size_t N); 
RWClassicWString&
replace(size_t pos, size_t N, const wchar_t* cs); 
RWClassicWString&
replace(size_t pos, size_t N1,const wchar_t* cs, size_t N2);
RWClassicWString&
replace(size_t pos, size_t N, const RWClassicWString& str);
RWClassicWString&
replace(size_t pos, size_t N1,
        const RWClassicWString& str, size_t N2);
void
resize(size_t n); 
RWClassicWSubString
strip(stripType s = RWClassicWString::trailing, 
       wchar_t c = L' '); 
const RWClassicWSubString
strip(stripType s = RWClassicWString::trailing, 
       wchar_t c = L' ') const;
RWClassicWSubString
subString(const wchar_t* cs, size_t start=0, 
          caseCompare = RWClassicWString::exact);
RWClassicWSubString
subString(const wchar_t* cs, size_t start=0,
          caseCompare = RWClassicWString::exact) const;
RWClassicCString 
toAscii() const; 
void
toLower();
RWClassicCString
toMultiByte() const; 
void
toUpper();

Static Public Member Functions

static RWClassicWString
fromAscii(const RWClassicCString& str)
static RWClassicWString
fromMultiByte(const RWClassicCString& str)
static unsigned
hash(const RWClassicWString& wstr); 
static size_t
initialCapacity(size_t ic = 15); 
static size_t
maxWaste(size_t mw = 15); 
static size_t
resizeIncrement(size_t ri = 16); 

Related Global Operators

RWBoolean
operator==(const RWClassicWString&, const wchar_t*  ); 
RWBoolean
operator==(const wchar_t*,          const RWClassicWString&);
RWBoolean
operator==(const RWClassicWString&, const RWClassicWString&);
RWBoolean
operator!=(const RWClassicWString&, const wchar_t*  );
RWBoolean
operator!=(const wchar_t*,          const RWClassicWString&);
RWBoolean
operator!=(const RWClassicWString&, const RWClassicWString&);
RWBoolean
operator< (const RWClassicWString&,  const wchar_t*  ); 
RWBoolean
operator< (const wchar_t*,           const RWClassicWString&);
RWBoolean
operator< (const RWClassicWString&,  const RWClassicWString&);
RWBoolean
operator> (const RWClassicWString&,  const wchar_t*  ); 
RWBoolean
operator> (const wchar_t*,           const RWClassicWString&);
RWBoolean
operator> (const RWClassicWString&,  const RWClassicWString&);
RWBoolean
operator<=(const RWClassicWString&,  const wchar_t*  ); 
RWBoolean
operator<=(const wchar_t*,           const RWClassicWString&);
RWBoolean
operator<=(const RWClassicWString&,  const RWClassicWString&);
RWBoolean
operator>=(const RWClassicWString&,  const wchar_t*  );
RWBoolean
operator>=(const wchar_t*,           const RWClassicWString&);
RWBoolean
operator>=(const RWClassicWString&,  const RWClassicWString&);
RWClassicWString
operator+(const RWClassicWString&,   const RWClassicWString&);
RWClassicWString
operator+(const wchar_t*,            const RWClassicWString&);
RWClassicWString
operator+(const RWClassicWString&,   const wchar_t*
ostream&
operator<<(ostream& s, const RWClassicWString& str); 
istream&
operator>>(istream& s, RWClassicWString& str); 
RWvostream&
operator<<(RWvostream&, const RWClassicWString& str);
RWFile&
operator<<(RWFile&,     const RWClassicWString& str);
RWvistream&
operator>>(RWvistream&, RWClassicWString& str);
RWFile&
operator>>(RWFile&,     RWClassicWString& str);

Related Global Functions

RWClassicWString
strXForm(const RWClassicWString&);
RWClassicWString
toLower(const RWClassicWString& str); 
RWClassicWString
toUpper(const RWClassicWString& str); 


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.