Tools.h++ Manual

104011 Tandem Computers Incorporated 21-211
21
const;
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
caseCompare
argument.
RWWString& insert(size_t pos, const wchar_t* cs);
Insert a copy of the null-terminated string
cs
into self at position
pos
. Returns
a reference to self.
RWWString& insert(size_t pos, const wchar_t* cs,
size_t N);
Insert a copy of the first
N
characters of
cs
into self at position
pos
. Exactly
N
characters are copied, including any embedded nulls. Hence, the buffer pointed
to by
cs
must be at least
N
bytes long. Returns a reference to self.
RWWString& insert(size_t pos, const RWWString&
str);
Insert a copy of the string
str
into self at position
pos
. Returns a reference to
self.
RWWString& insert(size_t pos, const RWWString&
str, size_t N);
Insert a copy of the first
N
characters or the length of
str
(whichever is less) of
str into self at position
pos
. Returns a reference to self.
RWBoolean isAscii() const;
Returns
TRUE
if it is safe to perform the conversion
toAscii()
(that is, if all
characters of self are ASCII characters).
RWBoolean isNull() const;
Returns
TRUE
if this is a zero lengthed string (i.e., the null string).
size_t last(wchar_t c) const
;
Returns the index of the last occurrence in the string of the character
c
.
Returns
RW_NPOS
if there is no such character.
size_t length() const
;
Return the number of characters in self.
RWWString& prepend(const wchar_t* cs);
Prepend a copy of the null-terminated character string pointed to by
cs
to self.
Returns a reference to self.