Tools.h++ Class Reference

Table Of Contents
assignment operators still reference the old object and hence are very fast. An actual copy is made only when a
"write" is performed, that is if the object is about to be changed. The net result is excellent performance, but with
easy-to-understand copy semantics.
A separate RWWSubString class supports substring extraction and modification operations.
Persistence
Simple
Example
#include <rw/rstream.h>
#include <rw/wstring.h>
main(){
RWWString a(L"There is no joy in Beantown");
a.subString(L"Beantown") = L"Redmond";
cout << a << endl;
return 0;
}
Program output:
There is no joy in Redmond.
Enumerations
enum RWWString::caseCompare { exact, ignoreCase };
Used to specify whether comparisons, searches, and hashing functions should use case sensitive (exact) or
case-insensitive (ignoreCase) semantics..
enum RWWString::multiByte_ { multiByte };
Allow conversion from multibyte character strings to wide character strings. See constructor below.
enum RWWString::ascii_ {ascii };
Allow conversion from ASCII character strings to wide character strings. See constructor below.
Public Constructors
RWWString();
Creates a string of length zero (the null string).
RWWString(const wchar_t* cs);
Creates a string from the wide character string cs. The created string will copy the data pointed to by cs, up to
the first terminating null.
RWWString(const wchar_t* cs, size_t N);
Constructs a string from the character string cs. The created string will copy 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(RWSize_T ic);
Creates a string of length zero (the null string). The string's capacity (that is, the size it can grow to without