Tools.h++ Manual
21-80 104011 Tandem Computers Incorporated
21
self, until an
EOF
or the delimiting character
delim
is encountered. The
delimiter is removed from the input stream but is not stored. 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. Null
characters are treated the same as other characters. Whitespace is identified by
the standard C library function
isspace()
.
RWCString& remove(size_t pos);
Removes the characters from the position
pos
to the end of string. Returns a
reference to self.
RWCString& 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.
RWCString& replace(size_t pos, size_t N, const
char* 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.
RWCString& replace(size_t pos, size_t N1,
const char* 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
N
2 bytes long. Returns a reference to self.
RWCString& replace(size_t pos, size_t N, const
RWCString& 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.
RWCString& replace(size_t pos, size_t N1,
const RWCString& 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.