Tools.h++ Class Reference

Table Of Contents
Returns the index of the last occurrence in the string of the character c. Continues to
search past embedded nulls. Returns RW_NPOS if there is no such character. This
function is incompatible with MBCS strings.
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.
RWCSubString
match(const RWCRExpr& re, size_t start=0);
const RWCSubString
match(const RWCRExpr& re, size_t start=0) const;
Returns the first substring starting after index start that matches the regular expression re.
If there is no such substring, then the null substring is returned. The first variant can be
used as an lvalue. Note that this is used in place of operator()(const RWCRegexp&...) if
you want to use extended regular expressions.
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(). Provided only on platforms that provide ::mblen().
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. This function is incompatible with cs strings with embedded nulls. This
function may be incompatible with cs MBCS strings.
RWCString&
prepend(const char* cs, size_t N);
Prepend a copy of the character string cs to self. Exactly N bytes 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(char c, size_t N);
Prepend N copies of character c to self. 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);