Tools.h++ Manual

21-214 104011 Tandem Computers Incorporated
21
RWWString& replace(size_t pos, size_t N1,
const RWWString& str, size_t N2);
Replaces
N1
characters or to the end of string (whichever comes first) starting
at position
pos
with a copy of the first
N2
characters, or the length of
str
(whichever is less), from
str
. Returns a reference to self.
void resize(size_t n);
Changes the length of self, adding blanks (i.e.,
W' '
) or truncating as
necessary.
RWWSubString strip(stripType s = trailing,
wchar_t c )
;
Returns a substring of self where the character
c
has been stripped off the
beginning, end, or both ends of the string. The enum
stripType
can take
values:
stripType Meaning
leading Remove characters at beginning
trailing Remove characters at end
both Remove characters at both ends
RWWSubString subString(const wchar_t* cs,size_t
start=0, caseCompare=exact);
const RWWSubString subString(const wchar_t* cs, size_t
start=0, caseCompare=exact) const;
Returns a substring representing the first occurence of the null-terminated
string pointed to by "
cs
". Case sensitivity is according to the
caseCompare
argument; it defaults to
RWWString::exact
.
RWCString toAscii() const;
Returns an
RWCString
object of the same length as self, containing only ASCII
characters. Any non-ASCII characters in self simply have the high bits
stripped off. Use
isAscii()
to determine whether this function is safe to use.
RWCString toMultiByte() const;
Returns an
RWCString
containing the result of applying the standard C library
function
wcstombs()
to self. This function is always safe to use.
void toLower()
;
Changes all upper-case letters in self to lower-case. Uses the C library function
towlower()
.