Tools.h++ Manual
21-206 104011 Tandem Computers Incorporated
21
Example
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 };
Allows conversion from multibyte character strings to wide character strings.
See constructor below.
enum RWWString::ascii_ {ascii };
Allows 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)
;
Conversion from the null-terminated 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
bytes
long.
#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;
}