Tools.h++ Manual

104011 Tandem Computers Incorporated 21-213
21
delimiter is removed from the input stream but is not stored. The input stream
is treated as a sequence of multibyte characters, each of which is converted to a
wide character (using the Standard C library function
mbtowc()
) before
storing. Null characters are treated the same as other characters.
istream& readToken(istream& s);
Whitespace is skipped before saving characters. Characters are then read from
the input stream
s
, replacing previous contents of self, until trailing whitespace
or an EOF is encountered. The whitespace is left on the input stream. Only
ASCII whitespace characters are recognized, as defined by the standard C
library function
isspace()
. The input stream is treated as a sequence of
multibyte characters, each of which is converted to a wide character (using the
Standard C library function
mbtowc()
) before storing.
RWWString& remove(size_t pos);
Removes the characters from the position
pos
to the end of string. Returns a
reference to self.
RWWString& remove(size_t pos, size_t N);
Removes
N
characters or to the end of string (whichever comes first) starting at
the position
pos
. Returns a reference to self.
RWWString& replace(size_t pos, size_t N, const
wchar_t* cs);
Replaces
N
characters or to the end of string (whichever comes first) starting at
position
pos
with a copy of the null-terminated string
cs
. Returns a reference
to self.
RWWString& replace(size_t pos, size_t N1,
const wchar_t* cs, size_t N2);
Replaces
N1
characters or to the end of string (whichever comes first) starting
at position
pos
with a copy of the string
cs
. Exactly
N2
characters are copied,
including any embedded nulls. Hence, the buffer pointed to by
cs
must be at
least
N2
bytes long. Returns a reference to self.
RWWString& replace(size_t pos, size_t N, const
RWWString& str);
Replaces
N
characters or to the end of string (whichever comes first) starting at
position
pos
with a copy of the string
str
. Returns a reference to self.