rwlogo
SourcePro 11.1

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWWString Class Reference
[String Processing]

Manipulates wide character strings. More...

#include <rw/tools/wstring.h>

Inheritance diagram for RWWString:
RWCollectableWString

List of all members.

Public Types

enum  stripType { leading, trailing, both }
enum  caseCompare { exact, ignoreCase }
enum  ascii_ { ascii, singleByte }
enum  multiByte_ { multiByte }

Public Member Functions

 RWWString ()
 RWWString (const std::wstring &a)
 RWWString (const RWWString &str)
 RWWString (RWSize_T ic)
 RWWString (wchar_t c)
 RWWString (wchar_t c, size_t N)
 RWWString (const wchar_t *cs)
 RWWString (const wchar_t *cs, size_t N)
 RWWString (char c)
 RWWString (char c, size_t N)
 RWWString (const char *acs, ascii_)
 RWWString (const RWCString &acs, ascii_)
 RWWString (const char *mbcs, multiByte_)
 RWWString (const RWCString &mbcs, multiByte_)
 RWWString (const char *acs, size_t N, ascii_)
 RWWString (const char *mbcs, size_t N, multiByte_)
 RWWString (const RWWSubString &ss)
 RWWString (const RWWConstSubString &ss)
 operator const wchar_t * () const
RWWStringoperator= (wchar_t c)
RWWStringoperator= (const wchar_t *s)
RWWStringoperator= (const std::wstring &str)
RWWStringoperator= (const RWWString &str)
RWWStringoperator+= (const wchar_t *cs)
RWWStringoperator+= (const std::wstring &str)
RWWStringoperator+= (const RWWString &str)
wchar_t & operator() (size_t i)
wchar_t operator() (size_t i) const
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[] (long long i)
wchar_t & operator[] (unsigned long long i)
wchar_t operator[] (long long i) const
wchar_t operator[] (unsigned long long i) const
SubStringType operator() (size_t start, size_t len)
ConstSubStringType operator() (size_t start, size_t len) const
SubStringType subString (const wchar_t *cs, size_t start=0, caseCompare cmp=exact)
ConstSubStringType subString (const wchar_t *cs, size_t start=0, caseCompare cmp=exact) const
SubStringType strip (stripType s=trailing, wchar_t c=static_cast< wchar_t >( ' '))
ConstSubStringType strip (stripType s=trailing, wchar_t c=static_cast< wchar_t >( ' ')) const
RWWStringappend (const wchar_t *cs)
RWWStringappend (const wchar_t *cs, size_t N)
RWWStringappend (const std::wstring &str)
RWWStringappend (const RWWString &str)
RWWStringappend (const std::wstring &str, size_t N)
RWWStringappend (const RWWString &str, size_t N)
RWspace binaryStoreSize () const
size_t capacity () const
size_t capacity (size_t capac)
int collate (const wchar_t *str) const
int collate (const std::wstring &str) const
int collate (const RWWString &str) const
int compareTo (const wchar_t *str, caseCompare cmp=exact) const
int compareTo (const std::wstring &str, caseCompare cmp=exact) const
int compareTo (const std::wstring *str, caseCompare cmp=exact) const
int compareTo (const RWWString &str, caseCompare cmp=exact) const
int compareTo (const RWWString *str, caseCompare cmp=exact) const
bool contains (const wchar_t *cs, caseCompare cmp=exact) const
bool contains (const std::wstring &cs, caseCompare cmp=exact) const
bool contains (const RWWString &cs, caseCompare cmp=exact) const
const wchar_t * data () const
std::wstring & std ()
const std::wstring & std () const
size_t first (wchar_t c) const
size_t first (wchar_t c, size_t) const
size_t first (const wchar_t *str) const
size_t first (const wchar_t *str, size_t N) const
unsigned long hash (caseCompare cmp=exact) const
size_t index (const wchar_t *pat, size_t i=0, caseCompare cmp=exact) const
size_t index (const std::wstring &pat, size_t i=0, caseCompare cmp=exact) const
size_t index (const RWWString &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 std::wstring &pat, size_t patlen, size_t i, caseCompare cmp) const
size_t index (const RWWString &pat, size_t patlen, size_t i, caseCompare cmp) const
RWWStringinsert (size_t pos, const wchar_t *cs)
RWWStringinsert (size_t pos, const wchar_t *cs, size_t N)
RWWStringinsert (size_t pos, const std::wstring &str)
RWWStringinsert (size_t pos, const RWWString &str)
RWWStringinsert (size_t pos, const std::wstring &str, size_t N)
RWWStringinsert (size_t pos, const RWWString &str, size_t N)
bool isAscii () const
bool isNull () const
size_t last (wchar_t c) const
size_t last (wchar_t c, size_t) const
size_t last (const wchar_t *s) const
size_t last (const wchar_t *s, size_t N) const
size_t length () const
RWWStringprepend (const wchar_t *cs)
RWWStringprepend (const wchar_t *cs, size_t N)
RWWStringprepend (const std::wstring &str)
RWWStringprepend (const RWWString &str)
RWWStringprepend (const std::wstring &str, size_t N)
RWWStringprepend (const RWWString &str, size_t N)
std::istream & readFile (std::istream &is)
std::istream & readLine (std::istream &is, bool skipWhite=true)
std::istream & readString (std::istream &is)
std::istream & readToDelim (std::istream &is, wchar_t delim)
std::istream & readToken (std::istream &is)
RWWStringremove (size_t pos)
RWWStringremove (size_t pos, size_t N)
RWWStringreplace (size_t pos, size_t N, const wchar_t *cs)
RWWStringreplace (size_t pos, size_t N, const std::wstring &str)
RWWStringreplace (size_t pos, size_t N, const RWWString &str)
RWWStringreplace (size_t pos, size_t N1, const std::wstring &str, size_t N2)
RWWStringreplace (size_t pos, size_t N1, const RWWString &str, size_t N2)
void resize (size_t n)
size_t rindex (const wchar_t *pat, caseCompare cmp) const
size_t rindex (const wchar_t *pat, size_t i=RW_NPOS, caseCompare cmp=exact) const
size_t rindex (const std::wstring &pat, size_t i=RW_NPOS, caseCompare cmp=exact) const
size_t rindex (const RWWString &pat, size_t i=RW_NPOS, caseCompare cmp=exact) const
size_t rindex (const wchar_t *pat, size_t patlen, size_t i, caseCompare cmp) const
size_t rindex (const std::wstring &pat, size_t patlen, size_t i, caseCompare cmp) const
size_t rindex (const RWWString &pat, size_t patlen, size_t i, caseCompare cmp) const
RWCString toAscii () const
RWCString toMultiByte () const
void toLower ()
void toUpper ()
bool operator== (const RWWString &str) const
bool operator!= (const RWWString &str) const
bool operator< (const RWWString &str) const
bool operator> (const RWWString &str) const
bool operator<= (const RWWString &str) const
bool operator>= (const RWWString &str) const

Static Public Member Functions

static RWWString fromAscii (const RWCString &str)
static RWWString fromMultiByte (const RWCString &str)
static unsigned hash (const RWWString &wstr)
static size_t initialCapacity (size_t ic=15)
static size_t maxWaste (size_t)
static size_t resizeIncrement (size_t ri=16)

Friends

RWWString operator+ (const RWWString &str1, const RWWString &str2)
RWWString operator+ (const RWWString &str, const wchar_t *s)
RWWString operator+ (const wchar_t *s, const RWWString &str)
RWWString operator+ (const std::wstring &s, const RWWString &str)
RWWString operator+ (const RWWString &str, const std::wstring &s)

Related Functions

(Note that these are not member functions.)



RWWString strXForm (const std::wstring &str)
RWWString toLower (const RWWString &str)
RWWString toUpper (const RWWString &str)
std::ostream & operator<< (std::ostream &os, const RWWString &s)
std::istream & operator>> (std::istream &s, RWWString &str)
RWvistreamoperator>> (RWvistream &str, RWWString &cstr)
RWFileoperator>> (RWFile &file, RWWString &cstr)
RWvostreamoperator<< (RWvostream &vos, const RWWString &str)
RWFileoperator<< (RWFile &file, const RWWString &str)
bool operator== (const RWWString &s1, const wchar_t *s2)
bool operator== (const wchar_t *s1, const RWWString &s2)
bool operator== (const RWWString &s1, const std::wstring &s2)
bool operator== (const std::wstring &s1, const RWWString &s2)
bool operator!= (const RWWString &s1, const wchar_t *s2)
bool operator!= (const wchar_t *s1, const RWWString &s2)
bool operator!= (const RWWString &s1, const std::wstring &s2)
bool operator!= (const std::wstring &s1, const RWWString &s2)
bool operator< (const RWWString &s1, const wchar_t *s2)
bool operator< (const wchar_t *s1, const RWWString &s2)
bool operator< (const RWWString &s1, const std::wstring &s2)
bool operator< (const std::wstring &s1, const RWWString &s2)
bool operator> (const RWWString &s1, const wchar_t *s2)
bool operator> (const wchar_t *s1, const RWWString &s2)
bool operator> (const RWWString &s1, const std::wstring &s2)
bool operator> (const std::wstring &s1, const RWWString &s2)
bool operator<= (const RWWString &s1, const wchar_t *s2)
bool operator<= (const wchar_t *s1, const RWWString &s2)
bool operator<= (const RWWString &s1, const std::wstring &s2)
bool operator<= (const std::wstring &s1, const RWWString &s2)
bool operator>= (const RWWString &s1, const wchar_t *s2)
bool operator>= (const wchar_t *s1, const RWWString &s2)
bool operator>= (const RWWString &s1, const std::wstring &s2)
bool operator>= (const std::wstring &s1, const RWWString &s2)

Detailed Description

Offers powerful and convenient facilities for manipulating wide character strings. Class RWWString offers very powerful and convenient facilities for manipulating wide character strings.

Note:
RWWString is designed for use with wide character strings. To manipulate multibyte character sequences, use RWCString.

This string class manipulates wide characters of the fundamental type wchar_t. These characters are generally two or four bytes, and can be used to encode richer code sets than the classic "char" type. Because wchar_t characters are all the same size, indexing is fast.

Conversion to and from multibyte and US-ASCII forms are provided by the RWWString constructors, and by the RWWString member functions isAscii(), toAscii(), and toMultiByte().

Stream operations implicitly translate to and from the multibyte stream representation. That is, on output, wide character strings are converted into multibyte strings, while on input they are converted back into wide character strings. Hence, the external representation of wide character strings is usually as multibyte character strings, saving storage space, and making interfaces with devices (which usually expect multibyte strings) easier.

RWWString tolerates embedded nulls.

Parameters of type "const wchar_t*" must not be passed a value of zero. This is detected in the debug version of the library.

A separate RWWSubString class supports substring extraction and modification operations.

Synopsis

 #include <rw/wstring.h>
 RWWString a;

Persistence

Simple

Examples

 #include <iostream>
 #include <rw/wstring.h>
 
 int main ()
 {
     RWWString a(L"There is no joy in Beantown");
 
     std::cout << a << std::endl << "becomes......" << std::endl;
 
     a.subString(L"Beantown") = L"Redmond";
 
     std::cout << a << std::endl;
 
     return 0;
 
 }

Member Enumeration Documentation

Allows conversion from US-ASCII character strings to wide character strings.

Enumerator:
ascii 

Convert from US-ASCII.

singleByte 

Convert from EBCDIC.

Specifies semantics used by comparisons, searches, and hashing functions

Enumerator:
exact 

Use exact case sensitive semantics.

ignoreCase 

Ignore case sensitive semantics.

Allows conversion from multibyte character strings to wide character strings.

Enumerator:
multiByte 

Convert from multibyte.

Specifies how to strip characters from a string. Used by strip().

Enumerator:
leading 

Remove characters at beginning.

trailing 

Remove characters at end.

both 

Remove characters at both ends.


Constructor & Destructor Documentation

RWWString::RWWString (  )  [inline]

Creates a string of length zero (the null string).

RWWString::RWWString ( const std::wstring &  a  )  [inline]

Constructs an RWWString with one element a.

RWWString::RWWString ( const RWWString str  )  [inline]

Copy constructor. The created string copies the data from str.

RWWString::RWWString ( RWSize_T  ic  )  [inline]

Creates a string of length zero (the null string). The string's capacity (that is, the size it can grow without resizing) is given by the parameter ic.

RWWString::RWWString ( wchar_t  c  )  [inline]

Constructs a string containing the single signed character c.

RWWString::RWWString ( wchar_t  c,
size_t  N 
) [inline]

Constructs a string containing the character c repeated N times.

RWWString::RWWString ( const wchar_t *  cs  )  [inline]

Creates a string from the wide character string cs. The created string copies the data pointed to by cs, up to the first terminating null.

RWWString::RWWString ( const wchar_t *  cs,
size_t  N 
) [inline]

Constructs a string from the character string cs. The created string copies the data pointed to by cs. Exactly N characters are copied, including any embedded nulls. Hence, the buffer pointed to by cs must be at least N * sizeof(wchar_t) bytes or N wide characters long.

RWWString::RWWString ( char  c  )  [inline]

Constructs a string containing the single character c.

RWWString::RWWString ( char  c,
size_t  N 
) [inline]

Constructs a string containing the character c repeated N times.

RWWString::RWWString ( const char *  acs,
ascii_   
) [inline]

Constructs a wide character string from the US-ASCII character string contained in acs. The conversion is done by simply stripping the high-order bit and, hence, is much faster than the more general constructor RWWString.

For this conversion to be successful, the string must contain only US-ASCII characters. This can be confirmed (if necessary) using RWCString::isAscii(). This constructor can be used as follows:

 RWWString a("An US-ASCII character string", RWWString::ascii);
RWWString::RWWString ( const RWCString acs,
ascii_   
)

Constructs a wide character string from the US-ASCII character string contained in acs. The conversion is done by simply stripping the high-order bit and, hence, is much faster than the more general constructor RWWString.

For this conversion to be successful, the string must contain only US-ASCII characters. This can be confirmed (if necessary) using RWCString::isAscii(). This constructor can be used as follows:

 RWWString a("An US-ASCII character string", RWWString::ascii);

RWWString::RWWString ( const char *  mbcs,
multiByte_   
) [inline]

Constructs a wide character string from the multibyte character string contained in mbcs. The conversion is done using the Standard C Library function mbstowcs(). This constructor can be used as follows:

 RWWString a("\306\374\315\313\306\374", multiByte);
RWWString::RWWString ( const RWCString mbcs,
multiByte_   
)

Constructs a wide character string from the multibyte character string contained in mbcs. The conversion is done using the Standard C Library function mbstowcs(). This constructor can be used as follows:

 RWWString a("\306\374\315\313\306\374", multiByte);

RWWString::RWWString ( const char *  acs,
size_t  N,
ascii_   
) [inline]

Constructs a wide character string from the US-ASCII character string contained in acs, copying exactly N characters including any embedded nulls. Hence, the buffer pointed to by acs must be long enough to hold N characters.

RWWString::RWWString ( const char *  mbcs,
size_t  N,
multiByte_   
) [inline]

Constructs a wide character string from the multibyte character string contained in mbcs, copying exactly N characters including any embedded nulls. Hence, the buffer pointed to by mbcs must be long enough to hold N characters.

RWWString::RWWString ( const RWWSubString ss  )  [inline]

Converts from sub-string. The created string copies the substring represented by ss.

RWWString::RWWString ( const RWWConstSubString ss  )  [inline]

Converts from substring. The created wide string copies the substring represented by ss.


Member Function Documentation

RWWString & RWWString::append ( const RWWString str,
size_t  N 
) [inline]

Appends the first N characters or the length of str (whichever is less) to self. Returns a reference to self.

RWWString & RWWString::append ( const std::wstring &  str,
size_t  N 
) [inline]

Appends the first N characters or the length of str (whichever is less) to self. Returns a reference to self.

RWWString & RWWString::append ( const RWWString str  )  [inline]

Appends a copy of the string str to self. Returns a reference to self.

RWWString & RWWString::append ( const std::wstring &  str  )  [inline]

Appends a copy of the string str to self. Returns a reference to self.

RWWString & RWWString::append ( const wchar_t *  cs,
size_t  N 
) [inline]

Appends a copy of the wide character string cs to self. Exactly N wide characters are copied, including any embedded nulls. Hence, the buffer pointed to by cs must be at least N * sizeof(wchar_t) bytes long. Returns a reference to self.

RWWString & RWWString::append ( const wchar_t *  cs  )  [inline]

Appends a copy of the null-terminated wide character string pointed to by cs to self. Returns a reference to self.

RWspace RWWString::binaryStoreSize (  )  const [inline]

Returns the number of bytes necessary to store the object using the global function:

Reimplemented in RWCollectableWString.

size_t RWWString::capacity ( size_t  capac  )  [inline]

A non-binding request to alter the capacity of self to capac. The capacity is never reduced below the current number of characters. Returns the actual capacity.

size_t RWWString::capacity (  )  const [inline]

Returns the current capacity of self. This is the number of characters the string can hold without resizing.

int RWWString::collate ( const RWWString str  )  const [inline]

Returns an int less than, greater than, or equal to zero, according to the result of calling the POSIX function wscoll() on self and the argument str. This method supports locale-dependent collation.

int RWWString::collate ( const std::wstring &  str  )  const [inline]

Returns an int less than, greater than, or equal to zero, according to the result of calling the POSIX function wscoll() on self and the argument str. This method supports locale-dependent collation.

int RWWString::collate ( const wchar_t *  str  )  const [inline]

Returns an int less than, greater than, or equal to zero, according to the result of calling the POSIX function wscoll() on self and the argument str. This method supports locale-dependent collation.

int RWWString::compareTo ( const RWWString str,
caseCompare  cmp = exact 
) const [inline]

Returns an int less than, greater than, or equal to zero, according to the result of calling the Standard C Library function memcmp() on self and the argument str. Case sensitivity is according to the cmp, and may be RWWString::exact or RWWString::ignoreCase. The default is RWWString::exact.

int RWWString::compareTo ( const RWWString str,
caseCompare  cmp = exact 
) const [inline]

Returns an int less than, greater than, or equal to zero, according to the result of calling the Standard C Library function memcmp() on self and the argument str. Case sensitivity is according to the cmp, and may be RWWString::exact or RWWString::ignoreCase. The default is RWWString::exact.

Reimplemented in RWCollectableWString.

int RWWString::compareTo ( const std::wstring *  str,
caseCompare  cmp = exact 
) const [inline]

Returns an int less than, greater than, or equal to zero, according to the result of calling the Standard C Library function memcmp() on self and the argument str. Case sensitivity is according to the cmp, and may be RWWString::exact or RWWString::ignoreCase. The default is RWWString::exact.

int RWWString::compareTo ( const std::wstring &  str,
caseCompare  cmp = exact 
) const [inline]

Returns an int less than, greater than, or equal to zero, according to the result of calling the Standard C Library function memcmp() on self and the argument str. Case sensitivity is according to the cmp, and may be RWWString::exact or RWWString::ignoreCase. The default is RWWString::exact.

int RWWString::compareTo ( const wchar_t *  str,
caseCompare  cmp = exact 
) const [inline]

Returns an int less than, greater than, or equal to zero, according to the result of calling the Standard C Library function memcmp() on self and the argument str. Case sensitivity is according to the cmp, and may be RWWString::exact or RWWString::ignoreCase. The default is RWWString::exact.

Reimplemented in RWCollectableWString.

bool RWWString::contains ( const RWWString cs,
caseCompare  cmp = exact 
) const [inline]

Pattern matching. Returns true if cs occurs in self. Case sensitivity is according to to the cmp argument, and may be RWWString::exact or RWWString::ignoreCase. The default is RWWString::exact.

bool RWWString::contains ( const std::wstring &  cs,
caseCompare  cmp = exact 
) const [inline]

Pattern matching. Returns true if cs occurs in self. Case sensitivity is according to to the cmp argument, and may be RWWString::exact or RWWString::ignoreCase. The default is RWWString::exact.

bool RWWString::contains ( const wchar_t *  cs,
caseCompare  cmp = exact 
) const [inline]

Pattern matching. Returns true if cs occurs in self. Case sensitivity is according to to the cmp argument, and may be RWWString::exact or RWWString::ignoreCase. The default is RWWString::exact.

const wchar_t* RWWString::data ( void   )  const [inline]

Provides access to the RWWString data as a null-terminated string. This datum is owned by the RWWString and may not be deleted or changed. If the RWWString object itself changes or goes out of scope, the pointer value previously returned becomes invalid. While the string is null-terminated, note that its length is still given by the member function length(). That is, it may contain embedded nulls.

size_t RWWString::first ( const wchar_t *  str,
size_t  N 
) const [inline]

Returns the index of the first occurrence in self of any character in str. Exactly N characters in str are checked including any embedded nulls, so str must point to a buffer containing at least N wide characters. Returns RW_NPOS if there is no match.

size_t RWWString::first ( const wchar_t *  str  )  const [inline]

Returns the index of the first occurrence in self of any character in str. Returns RW_NPOS if there is no match or if there is an embedded null prior to finding any character from str.

size_t RWWString::first ( wchar_t  c,
size_t   
) const [inline]

Returns the index of the first occurrence of the wide character c in self. Continues to search past embedded nulls. Returns RW_NPOS if there is no such character.

size_t RWWString::first ( wchar_t  c  )  const [inline]

Returns the index of the first occurrence of the wide character c in self. Returns RW_NPOS if there is no such character or if there is an embedded null prior to finding c.

static RWWString RWWString::fromAscii ( const RWCString str  )  [inline, static]

Convenience member function. Returns the result of the constructor RWWString::RWWString(const RWCString&, RWWString::ascii).

static RWWString RWWString::fromMultiByte ( const RWCString str  )  [inline, static]

Convenience member function. Returns the result of the constructor RWWString::RWWString(const RWCString&, RWWString::multiByte).

static unsigned RWWString::hash ( const RWWString wstr  )  [inline, static]

Returns the hash value of str as returned by hash(caseCompare) const, where caseCompare is RWWString::exact.

Reimplemented in RWCollectableWString.

unsigned long RWWString::hash ( caseCompare  cmp = exact  )  const

Returns a suitable hash value.

Reimplemented in RWCollectableWString.

size_t RWWString::index ( const RWWString pat,
size_t  patlen,
size_t  i,
caseCompare  cmp 
) const [inline]

Pattern matching. Starting with index i, searches for the first occurrence of the first patlen characters from pat in self, and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to the cmp argument.

size_t RWWString::index ( const std::wstring &  pat,
size_t  patlen,
size_t  i,
caseCompare  cmp 
) const [inline]

Pattern matching. Starting with index i, searches for the first occurrence of the first patlen characters from pat in self, and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to the cmp argument.

size_t RWWString::index ( const wchar_t *  pat,
size_t  patlen,
size_t  i,
caseCompare  cmp 
) const [inline]

Pattern matching. Starting with index i, searches for the first occurrence of the first patlen characters from pat in self, and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to the cmp argument.

size_t RWWString::index ( const RWWString pat,
size_t  i = 0,
caseCompare  cmp = exact 
) const [inline]

Pattern matching. Starting with index i, searches for the first occurrence of pat in self, and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to the cmp argument. The default is RWWString::exact.

size_t RWWString::index ( const std::wstring &  pat,
size_t  i = 0,
caseCompare  cmp = exact 
) const [inline]

Pattern matching. Starting with index i, searches for the first occurrence of pat in self, and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to the cmp argument. The default is RWWString::exact.

size_t RWWString::index ( const wchar_t *  pat,
size_t  i = 0,
caseCompare  cmp = exact 
) const [inline]

Pattern matching. Starting with index i, searches for the first occurrence of pat in self, and returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to the cmp argument. The default is RWWString::exact.

static size_t RWWString::initialCapacity ( size_t  ic = 15  )  [inline, static]

Sets the minimum initial capacity of an RWWString, and returns the old value. The initial setting is 15 wide characters. Larger values use more memory, but result in fewer resizes when concatenating or reading strings. Smaller values waste less memory, but result in more resizes.

RWWString & RWWString::insert ( size_t  pos,
const RWWString str,
size_t  N 
) [inline]

Inserts a copy of the first N wide characters or the length of str (whichever is less) of str into self at position pos. Returns a reference to self.

RWWString & RWWString::insert ( size_t  pos,
const std::wstring &  str,
size_t  N 
) [inline]

Inserts a copy of the first N wide characters or the length of str (whichever is less) of str into self at position pos. Returns a reference to self.

RWWString & RWWString::insert ( size_t  pos,
const RWWString str 
) [inline]

Inserts a copy of the string str into self at position pos. Returns a reference to self.

RWWString & RWWString::insert ( size_t  pos,
const std::wstring &  str 
) [inline]

Inserts a copy of the string str into self at position pos. Returns a reference to self.

RWWString & RWWString::insert ( size_t  pos,
const wchar_t *  cs,
size_t  N 
) [inline]

Inserts a copy of the first N wide characters of cs into self at position pos. Exactly N wide characters are copied, including any embedded nulls. Hence, the buffer pointed to by cs must be at least N * sizeof(wchar_t) bytes long. Returns a reference to self.

RWWString & RWWString::insert ( size_t  pos,
const wchar_t *  cs 
) [inline]

Inserts a copy of the null-terminated string cs into self at position pos. Returns a reference to self.

bool RWWString::isAscii (  )  const

Returns true if it is safe to perform the conversion toAscii() (that is, if all characters of self are US-ASCII characters).

bool RWWString::isNull ( void   )  const [inline]

Returns true if this string has zero length (i.e., the null string).

size_t RWWString::last ( const wchar_t *  s,
size_t  N 
) const [inline]

Returns the index of the last occurrence in the string of the wide character c. Returns RW_NPOS if there is no such character.

size_t RWWString::last ( const wchar_t *  s  )  const [inline]

Returns the index of the last occurrence in the string of the wide character c. Returns RW_NPOS if there is no such character.

size_t RWWString::last ( wchar_t  c,
size_t   
) const [inline]

Returns the index of the last occurrence in the string of the wide character c. Returns RW_NPOS if there is no such character.

size_t RWWString::last ( wchar_t  c  )  const [inline]

Returns the index of the last occurrence in the string of the wide character c. Returns RW_NPOS if there is no such character.

size_t RWWString::length (  )  const [inline]

Returns the number of characters in self.

static size_t RWWString::maxWaste ( size_t   )  [inline, static]
Deprecated:
Sets the maximum amount of unused space allowed in a wide string should it shrink, and returns the old value. The initial setting is 15 wide characters. If more than mw characters are wasted, then excess space will be reclaimed.
RWWString::operator const wchar_t * (  )  const [inline]

Accesses data in an RWWString as a null-terminated wide string. This datum is owned by the RWWString and may not be deleted or changed. If the RWWString object itself changes or goes out of scope, the pointer value previously returned becomes invalid. While the string is null-terminated, note that its length is still given by the member function length(). That is, it may contain embedded nulls.

bool RWWString::operator!= ( const RWWString str  )  const [inline]

Returns false if self is lexicographically equal to str. Otherwise returns true. Case sensitivity is RWWString::exact. Use member RWWString::collate()or RWWString::strXForm() for locale sensitivity.

RWWConstSubString RWWString::operator() ( size_t  start,
size_t  len 
) const [inline]

Substring operator. Returns a substring of self with length len, starting at index start.The sum of start plus len must be less than or equal to the string length.

Exceptions:
RWBoundsErr Thrown if the library was built using the RW_DEBUG flag, and start and len are out of range.
RWWSubString RWWString::operator() ( size_t  start,
size_t  len 
) [inline]

Substring operator. Returns a substring of self with length len, starting at index start. The sum of start plus len must be less than or equal to the string length.

Exceptions:
RWBoundsErr Thrown if the library was built using the RW_DEBUG flag, and start and len are out of range.
wchar_t RWWString::operator() ( size_t  i  )  const [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed if the pre-processor macro RWBOUNDS_CHECK has been defined before including <rw/wstring.h>.

Exceptions:
RWBoundsErr Thrown if the index is out of range.
wchar_t & RWWString::operator() ( size_t  i  )  [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed if the pre-processor macro RWBOUNDS_CHECK has been defined before including <rw/wstring.h>.

Exceptions:
RWBoundsErr Thrown if the index is out of range.
RWWString& RWWString::operator+= ( const RWWString str  )  [inline]

Appends the string str to self. Returns a reference to self.

RWWString& RWWString::operator+= ( const std::wstring &  str  )  [inline]

Appends the string str to self. Returns a reference to self.

RWWString& RWWString::operator+= ( const wchar_t *  cs  )  [inline]

Appends the null-terminated character string pointed to by cs to self. Returns a reference to self.

bool RWWString::operator< ( const RWWString str  )  const [inline]

Returns true if self is lexicographically before str. Otherwise returns false. Case sensitivity is RWWString::exact. Use member RWWString::collate()or RWWString::strXForm() for locale sensitivity.

bool RWWString::operator<= ( const RWWString str  )  const [inline]

Returns false if self is lexicographically after str. Otherwise returns true. Case sensitivity is RWWString::exact. Use member RWWString::collate()or RWWString::strXForm() for locale sensitivity.

RWWString & RWWString::operator= ( const RWWString str  )  [inline]

Assignment operator. Copies data in str. Returns a reference to self.

RWWString & RWWString::operator= ( const std::wstring &  str  )  [inline]

Assignment operator. Copies data in str. Returns a reference to self.

RWWString & RWWString::operator= ( const wchar_t *  s  )  [inline]

Assignment operator. Copies data in str. Returns a reference to self.

RWWString & RWWString::operator= ( wchar_t  c  )  [inline]

Assignment operator. Copies data in str. Returns a reference to self.

bool RWWString::operator== ( const RWWString str  )  const [inline]

Returns true if self is lexicographically equal to str. Otherwise returns false. Case sensitivity is RWWString::exact. Use member RWWString::collate()or RWWString::strXForm() for locale sensitivity.

bool RWWString::operator> ( const RWWString str  )  const [inline]

Returns true if self is lexicographically after str. Otherwise returns false. Case sensitivity is RWWString::exact. Use member RWWString::collate()or RWWString::strXForm() for locale sensitivity.

bool RWWString::operator>= ( const RWWString str  )  const [inline]

Returns false if self is lexicographically before str. Otherwise returns true. Case sensitivity is RWWString::exact. Use member RWWString::collate()or RWWString::strXForm() for locale sensitivity.

wchar_t RWWString::operator[] ( unsigned long long  i  )  const [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed.

Exceptions:
RWBoundsErr Thrown if the index is out of range.

wchar_t RWWString::operator[] ( long long  i  )  const [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed.

Exceptions:
RWBoundsErr Thrown if the index is out of range.

wchar_t & RWWString::operator[] ( unsigned long long  i  )  [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed.

Exceptions:
RWBoundsErr Thrown if the index is out of range.

wchar_t & RWWString::operator[] ( long long  i  )  [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed.

Exceptions:
RWBoundsErr Thrown if the index is out of range.

wchar_t RWWString::operator[] ( unsigned long  i  )  const [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed.

Exceptions:
RWBoundsErr Thrown if the index is out of range.

wchar_t RWWString::operator[] ( unsigned int  i  )  const [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed.

Exceptions:
RWBoundsErr Thrown if the index is out of range.

wchar_t RWWString::operator[] ( unsigned short  i  )  const [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed.

Exceptions:
RWBoundsErr Thrown if the index is out of range.

wchar_t RWWString::operator[] ( long  i  )  const [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed.

Exceptions:
RWBoundsErr Thrown if the index is out of range.

wchar_t RWWString::operator[] ( int  i  )  const [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed.

Exceptions:
RWBoundsErr Thrown if the index is out of range.

wchar_t RWWString::operator[] ( short  i  )  const [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed.

Exceptions:
RWBoundsErr Thrown if the index is out of range.
wchar_t & RWWString::operator[] ( unsigned long  i  )  [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed.

Exceptions:
RWBoundsErr Thrown if the index is out of range.

wchar_t & RWWString::operator[] ( unsigned int  i  )  [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed.

Exceptions:
RWBoundsErr Thrown if the index is out of range.

wchar_t & RWWString::operator[] ( unsigned short  i  )  [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed.

Exceptions:
RWBoundsErr Thrown if the index is out of range.

wchar_t & RWWString::operator[] ( long  i  )  [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed.

Exceptions:
RWBoundsErr Thrown if the index is out of range.

wchar_t & RWWString::operator[] ( int  i  )  [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed.

Exceptions:
RWBoundsErr Thrown if the index is out of range.

wchar_t & RWWString::operator[] ( short  i  )  [inline]

Returns the i th character. The index i must be between 0 and the length of the string less one. Bounds checking is performed.

Exceptions:
RWBoundsErr Thrown if the index is out of range.
RWWString & RWWString::prepend ( const RWWString str,
size_t  N 
) [inline]

Prepends the first N wide characters or the length of str (whichever is less) of str to self. Returns a reference to self.

RWWString & RWWString::prepend ( const std::wstring &  str,
size_t  N 
) [inline]

Prepends the first N wide characters or the length of str (whichever is less) of str to self. Returns a reference to self.

RWWString & RWWString::prepend ( const RWWString str  )  [inline]

Prepends a copy of the string str to self. Returns a reference to self.

RWWString & RWWString::prepend ( const std::wstring &  str  )  [inline]

Prepends a copy of the string str to self. Returns a reference to self.

RWWString & RWWString::prepend ( const wchar_t *  cs,
size_t  N 
) [inline]

Prepends a copy of the character string cs to self. Exactly N characters are copied, including any embedded nulls. Hence, the buffer pointed to by cs must be at least N * sizeof(wchart_t) bytes long. Returns a reference to self.

RWWString & RWWString::prepend ( const wchar_t *  cs  )  [inline]

Prepends a copy of the null-terminated wide character string pointed to by cs to self. Returns a reference to self.

std::istream& RWWString::readFile ( std::istream &  is  ) 

Reads characters from the input stream is, replacing the previous contents of self, until EOF is reached. The input stream is treated as a sequence of wide characters, each of which is read and stored in the RWWString object. Null characters are treated the same as other characters.

Note:
RWWString is designed for use with wide character strings; to manipulate multibyte character sequences, use RWCString.
std::istream & RWWString::readLine ( std::istream &  is,
bool  skipWhite = true 
) [inline]

Reads characters from the input stream is, replacing the previous contents of self, until a newline (or an EOF) is encountered. The newline is removed from the input stream but is not stored. The input stream is treated as a sequence of wide characters, each of which is read and stored in the RWWString object. Null characters are treated the same as other characters. If the skipWhite argument is true, then whitespace is skipped (using the iostream library manipulator ws) before saving characters.

Note:
RWWString is designed for use with wide character strings; to manipulate multibyte character sequences, use RWCString.
std::istream & RWWString::readString ( std::istream &  is  )  [inline]

Reads characters from the input stream is, replacing the previous contents of self, until an EOF or null terminator is encountered. The input stream is treated as a sequence of wide characters, each of which is read and stored in the RWWString object.

Note:
RWWString is designed for use with wide character strings; to manipulate multibyte character sequences, use RWCString.
std::istream& RWWString::readToDelim ( std::istream &  is,
wchar_t  delim 
) [inline]

Reads characters from the input stream is, replacing the previous contents of self, until an EOF or the delimiting character delim is encountered. The delimiter is removed from the input stream but is not stored. The input stream is treated as a sequence of wide characters, each of which is read and stored in the RWWString object. Null characters are treated the same as other characters.

Note:
RWWString is designed for use with wide character strings; to manipulate multibyte character sequences, use RWCString.
std::istream& RWWString::readToken ( std::istream &  is  ) 

Whitespace is skipped before storing characters into a wide string. Characters are then read from the input stream is, replacing previous contents of self, until trailing whitespace or an EOF is encountered. The trailing whitespace is left on the input stream. Only US-ASCII whitespace characters are recognized, as defined by the Standard C Library function isspace(). The input stream is treated as a sequence of wide characters, each of which is read and stored in the RWWString object.

Note:
RWWString is designed for use with wide character strings; to manipulate multibyte character sequences, use RWCString.
RWWString & RWWString::remove ( size_t  pos,
size_t  N 
) [inline]

Removes N wide characters or to the end of string (whichever comes first) starting at the position pos, which must be no greater than length(). Returns a reference to self.

RWWString & RWWString::remove ( size_t  pos  )  [inline]

Removes the characters to the end of string, starting at the position pos, which must be no greater than length(). Returns a reference to self.

RWWString & RWWString::replace ( size_t  pos,
size_t  N1,
const RWWString str,
size_t  N2 
) [inline]

Replaces N1 characters or to the end of string (whichever comes first) starting at position pos, which must be no greater than length(), with a copy of the first N2 characters, or the length of str (whichever is less), from str. Returns a reference to self.

RWWString & RWWString::replace ( size_t  pos,
size_t  N1,
const std::wstring &  str,
size_t  N2 
) [inline]

Replaces N1 characters or to the end of string (whichever comes first) starting at position pos, which must be no greater than length(), with a copy of the first N2 characters, or the length of str (whichever is less), from str. Returns a reference to self.

RWWString & RWWString::replace ( size_t  pos,
size_t  N,
const RWWString str 
) [inline]

Replaces N characters or to the end of string (whichever comes first) starting at position pos, which must be no greater than length(), with a copy of the string str. Returns a reference to self.

RWWString & RWWString::replace ( size_t  pos,
size_t  N,
const std::wstring &  str 
) [inline]

Replaces N characters or to the end of string (whichever comes first) starting at position pos, which must be no greater than length(), with a copy of the string str. Returns a reference to self.

RWWString & RWWString::replace ( size_t  pos,
size_t  N,
const wchar_t *  cs 
) [inline]

Replaces N wide characters or to the end of string (whichever comes first) starting at position pos, which must be no greater than length(), with a copy of the null-terminated string cs. Returns a reference to self.

void RWWString::resize ( size_t  n  )  [inline]

Changes the length of self, adding blanks (i.e., L' ') or truncating as necessary.

static size_t RWWString::resizeIncrement ( size_t  ri = 16  )  [inline, static]

Sets the resize increment when more memory is needed to grow a wide string. Returns the old value. The initial setting is 16 wide characters.

size_t RWWString::rindex ( const RWWString pat,
size_t  patlen,
size_t  i,
caseCompare  cmp 
) const [inline]

Pattern matching. Starting with index i, searches for the occurrence of the first patlen characters from pat that start on or before index i and are closest to the end of self. If there is a match, returns the index of the start of the match; otherwise returns RW_NPOS. Case sensitivity is according to the cmp argument, which defaults to RWWString::exact.

size_t RWWString::rindex ( const std::wstring &  pat,
size_t  patlen,
size_t  i,
caseCompare  cmp 
) const [inline]

Pattern matching. Starting with index i, searches for the occurrence of the first patlen characters from pat that start on or before index i and are closest to the end of self. If there is a match, returns the index of the start of the match; otherwise returns RW_NPOS. Case sensitivity is according to the cmp argument, which defaults to RWWString::exact.

size_t RWWString::rindex ( const wchar_t *  pat,
size_t  patlen,
size_t  i,
caseCompare  cmp 
) const [inline]

Pattern matching. Starting with index i, searches for the occurrence of the first patlen characters from pat that start on or before index i and are closest to the end of self. If there is a match, returns the index of the start of the match; otherwise returns RW_NPOS. Case sensitivity is according to the cmp argument, which defaults to RWWString::exact.

size_t RWWString::rindex ( const RWWString pat,
size_t  i = RW_NPOS,
caseCompare  cmp = exact 
) const [inline]

Pattern matching. Starting with index i, searches for the occurrence of pat that starts on or before index i and is closest to the end of self. If there is a pattern match, returns the index of the start of the match; otherwise, returns RW_NPOS. Case sensitivity is according to the cmp argument, which defaults to RWWString::exact.

size_t RWWString::rindex ( const std::wstring &  pat,
size_t  i = RW_NPOS,
caseCompare  cmp = exact 
) const [inline]

Pattern matching. Starting with index i, searches for the occurrence of pat that starts on or before index i and is closest to the end of self. If there is a pattern match, returns the index of the start of the match; otherwise, returns RW_NPOS. Case sensitivity is according to the cmp argument, which defaults to RWWString::exact.

size_t RWWString::rindex ( const wchar_t *  pat,
size_t  i = RW_NPOS,
caseCompare  cmp = exact 
) const [inline]

Pattern matching. Starting with index i, searches for the occurrence of pat that starts on or before index i and is closest to the end of self. If there is a pattern match, returns the index of the start of the match; otherwise, returns RW_NPOS. Case sensitivity is according to the cmp argument, which defaults to RWWString::exact.

size_t RWWString::rindex ( const wchar_t *  pat,
caseCompare  cmp 
) const [inline]

Pattern matching. Starting at the rear of the string, searches for the first occurrence of pat closest to the end of the string. Returns the index of the start of the match. Returns RW_NPOS if there is no such pattern. Case sensitivity is according to the cmp argument.

const std::wstring& RWWString::std (  )  const [inline]

Returns a const reference to the underlying wide string.

std::wstring& RWWString::std (  ) 

Returns a reference to the underlying wide string.

ConstSubStringType RWWString::strip ( stripType  s = trailing,
wchar_t  c = static_cast< wchar_t >( ' ') 
) const

Returns a substring of self where the character c has been stripped off the beginning, end, or both ends of the string. See stripType for supported values.

SubStringType RWWString::strip ( stripType  s = trailing,
wchar_t  c = static_cast< wchar_t >( ' ') 
)

Returns a substring of self where the character c has been stripped off the beginning, end, or both ends of the string. See stripType for supported values.

ConstSubStringType RWWString::subString ( const wchar_t *  cs,
size_t  start = 0,
caseCompare  cmp = exact 
) const

Returns a substring representing the first occurrence of the null-terminated string pointed to by cs. Case sensitivity is according to the cmp argument; The default is RWWString::exact.

SubStringType RWWString::subString ( const wchar_t *  cs,
size_t  start = 0,
caseCompare  cmp = exact 
)

Returns a substring representing the first occurrence of the null-terminated string pointed to by cs. Case sensitivity is according to the cmp argument; The default is RWWString::exact.

RWCString RWWString::toAscii (  )  const

Returns an RWCString object of the same length as self, containing only US-ASCII characters. Any non-US-ASCII characters in self simply have the high bits stripped off. Use isAscii() to determine whether this function is safe to use.

void RWWString::toLower (  )  [inline]

Changes all upper-case letters in self to lower-case. Uses the C library function towlower().

RWCString RWWString::toMultiByte (  )  const

Returns an RWCString object the same length as self, containing only multibyte characters.

Note:
This method does not handle embedded nulls on systems where wcstombs() doesn't handle them; returns an empty string if the wide string cannot be translated (for instance, if the correct locale is not set to convert a specific character).
void RWWString::toUpper (  )  [inline]

Changes all lower-case letters in self to upper-case. Uses the C library function towupper().


Friends And Related Function Documentation

bool operator!= ( const std::wstring &  s1,
const RWWString s2 
) [related]

Returns false if s1 and s2 are lexicographically equal. Otherwise returns true. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator!= ( const RWWString s1,
const std::wstring &  s2 
) [related]

Returns false if s1 and s2 are lexicographically equal. Otherwise returns true. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator!= ( const wchar_t *  s1,
const RWWString s2 
) [related]

Returns false if s1 and s2 are lexicographically equal. Otherwise returns true. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator!= ( const RWWString s1,
const wchar_t *  s2 
) [related]

Returns false if s1 and s2 are lexicographically equal. Otherwise returns true. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

RWWString operator+ ( const RWWString str,
const std::wstring &  s 
) [friend]

Concatenation operator.

RWWString operator+ ( const std::wstring &  s,
const RWWString str 
) [friend]

Concatenation operator.

RWWString operator+ ( const wchar_t *  s,
const RWWString str 
) [friend]

Concatenation operator.

RWWString operator+ ( const RWWString str,
const wchar_t *  s 
) [friend]

Concatenation operator.

RWWString operator+ ( const RWWString str1,
const RWWString str2 
) [friend]

Concatenation operator.

bool operator< ( const std::wstring &  s1,
const RWWString s2 
) [related]

Returns true if s1 is lexicographically before s2. Otherwise returns false. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator< ( const RWWString s1,
const std::wstring &  s2 
) [related]

Returns true if s1 is lexicographically before s2. Otherwise returns false. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator< ( const wchar_t *  s1,
const RWWString s2 
) [related]

Returns true if s1 is lexicographically before s2. Otherwise returns false. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator< ( const RWWString s1,
const wchar_t *  s2 
) [related]

Returns true if s1 is lexicographically before s2. Otherwise returns false. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

RWFile & operator<< ( RWFile file,
const RWWString str 
) [related]

Saves string str to an RWFile.

RWvostream & operator<< ( RWvostream vos,
const RWWString str 
) [related]

Saves string str to a virtual stream.

std::ostream & operator<< ( std::ostream &  os,
const RWWString s 
) [related]

Outputs an RWWString on ostream os as a sequence of bytes. This is done literally from the byte content of the characters.

bool operator<= ( const std::wstring &  s1,
const RWWString s2 
) [related]

Returns false if s1 is lexicographically after s2. Otherwise returns true. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator<= ( const RWWString s1,
const std::wstring &  s2 
) [related]

Returns false if s1 is lexicographically after s2. Otherwise returns true. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator<= ( const wchar_t *  s1,
const RWWString s2 
) [related]

Returns false if s1 is lexicographically after s2. Otherwise returns true. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator<= ( const RWWString s1,
const wchar_t *  s2 
) [related]

Returns false if s1 is lexicographically after s2. Otherwise returns true. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator== ( const std::wstring &  s1,
const RWWString s2 
) [related]

Returns true if s1 and s2 are lexicographically equal. Otherwise returns false. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator== ( const RWWString s1,
const std::wstring &  s2 
) [related]

Returns true if s1 and s2 are lexicographically equal. Otherwise returns false. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator== ( const wchar_t *  s1,
const RWWString s2 
) [related]

Returns true if s1 and s2 are lexicographically equal. Otherwise returns false. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator== ( const RWWString s1,
const wchar_t *  s2 
) [related]

Returns true if s1 and s2 are lexicographically equal. Otherwise returns false. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator> ( const std::wstring &  s1,
const RWWString s2 
) [related]

Returns true if s1 is lexicographically after s2. Otherwise returns false. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator> ( const RWWString s1,
const std::wstring &  s2 
) [related]

Returns true if s1 is lexicographically after s2. Otherwise returns false. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator> ( const wchar_t *  s1,
const RWWString s2 
) [related]

Returns true if s1 is lexicographically after s2. Otherwise returns false. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator> ( const RWWString s1,
const wchar_t *  s2 
) [related]

Returns true if s1 is lexicographically after s2. Otherwise returns false. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator>= ( const std::wstring &  s1,
const RWWString s2 
) [related]

Returns false if s1 is lexicographically before s2. Otherwise returns true. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator>= ( const RWWString s1,
const std::wstring &  s2 
) [related]

Returns false if s1 is lexicographically before s2. Otherwise returns true. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator>= ( const wchar_t *  s1,
const RWWString s2 
) [related]

Returns false if s1 is lexicographically before s2. Otherwise returns true. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

bool operator>= ( const RWWString s1,
const wchar_t *  s2 
) [related]

Returns false if s1 is lexicographically before s2. Otherwise returns true. Case sensitivity is RWWString::exact. Use member RWWString::collate() or RWWString::strXForm() for locale sensitivity.

RWFile & operator>> ( RWFile file,
RWWString cstr 
) [related]

Restores a wide character string into cstr from an RWFile, replacing the previous contents of cstr.

If an error occurs while extracting the string, the operator returns the original string contents unmodified. Check the file to determine if an error occurred on extraction.

RWvistream & operator>> ( RWvistream str,
RWWString cstr 
) [related]

Restores a wide character string into cstr from a virtual stream, replacing the previous contents of cstr.

If an error occurs while extracting the string, the operator returns the original string contents unmodified. Check the virtual stream to determine if an error occurred on extraction.

std::istream & operator>> ( std::istream &  s,
RWWString str 
) [related]

Calls str.readToken(s). That is, a token is read from the input stream s.

RWWString strXForm ( const std::wstring &  str  )  [related]

Returns a string transformed by wsxfrm(), to allow quicker collation than RWWString::collate().

RWWString toLower ( const RWWString str  )  [related]

Returns a version of str where all upper-case characters have been replaced with lower-case characters. Uses the C library function towlower().

RWWString toUpper ( const RWWString str  )  [related]

Returns a version of str where all lower-case characters have been replaced with upper-case characters. Uses the C library function towupper().


© 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.