Tools.h++ Class Reference

Table Of Contents
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 wide 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 string has zero length (i.e., the null string).
size_t
last(wchar_t c) const;
Returns the index of the last occurrence in the string of the wide 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 wide character string pointed to by cs to self. Returns a reference to
self.
RWWString&
prepend(const wchar_t* 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*sizeof(wchart_t) bytes long. Returns a reference to
self.
RWWString&
prepend(const RWWString& str);
Prepends a copy of the string str to self. Returns a reference to self.
RWWString&
prepend(const RWWString& cstr, size_t N);
Prepend the first N wide 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. 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&
readLine(istream& s, RWBoolean skipWhite = TRUE);