Tools.h++ Manual
104011 Tandem Computers Incorporated 21-79
21
size_t mbLength() const;
Return the number of multibyte characters in self, according to the Standard C
function
:: mblen()
. Returns
RW_NPOS
if a bad character is encountered.
Note that, in general,
mbLength() < length()
.
RWCString& prepend(const char* cs);
Prepend a copy of the null-terminated character string pointed to by
cs
to self.
Returns a reference to self.
RWCString& prepend(const char* cs, size_t N,
Prepend a copy of the character string
cs
to self. 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.
RWCString& prepend(const RWCString& str);
Prepends a copy of the string
str
to self. Returns a reference to self.
RWCString& prepend(const RWCString& cstr,
size_t N);
Prepend the first
N
characters or the length of
cstr
(whichever is less) of
cstr
to self. Returns a reference to self.
istream& readFile(istream& s);
Reads characters from the input stream
s
, replacing the previous contents of
self, until EOF is reached. Null characters are treated the same as other
characters.
istream& readLine(istream& s, RWBoolean
skipWhite = TRUE);
Reads characters from the input stream s, replacing the previous contents of
self, until a newline (or an
EOF
) is encountered. The newline is removed from
the input stream but is not stored. Null characters are treated the same as
other characters. If the
skipWhite
argument is
TRUE
, then whitespace is
skipped (using the iostream library manipulator
ws
) before saving characters.
istream& readString(istream& s);
Reads characters from the input stream
s
, replacing the previous contents of
self, until an
EOF
or null terminator is encountered.
istream& readToDelim(istream& s, char
delim='\n');
Reads characters from the input stream
s
, replacing the previous contents of