Tools.h++ Manual
21-78 104011 Tandem Computers Incorporated
21
size_t index(const RWCRegexp& re,size_t*
ext, size_t i=0) const;
Regular expression matching. Returns the index greater than or equal to
i
of
the start of the first pattern that matches the regular expression
re
. Returns
RW_NPOS
if there is no such pattern. The length of the matching pattern is
returned in the variable pointed to by
ext
.
RWCString& insert(size_t pos, const char* cs);
Insert a copy of the null-terminated string
cs
into self at position
pos
, thus
expanding the string. Returns a reference to self.
RWCString& insert(size_t pos, const char* 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.
Returns a reference to self.
RWCString& insert(size_t pos, const RWCString&
str)
;
Insert a copy of the string
str
into self at position
pos
. Returns a reference to
self.
RWCString& insert(size_t pos, const RWCString&
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 self contains no characters with the high bit set.
RWBoolean isNull() const;
Returns
TRUE
if this is a zero lengthed string (i.e., the null string).
size_t last(char 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 bytes in self. Note that if self contains multibyte
characters, then this will not be the number of characters.