Tools.h++ Class Reference

Table Of Contents
Changes the length of self to n bytes, adding blanks or truncating as necessary.
RWCSubString
strip(stripType s = RWCString::trailing, char c = ' ');
const RWCSubString
strip(stripType s = RWCString::trailing, char c = ' ')
const;
Returns a substring of self where the character c has been stripped off the beginning, end,
or both ends of the string. The first variant can be used as an lvalue. The enum stripType
can take values:
stripType Meaning
leading Remove characters at beginning
trailing Remove characters at end
both Remove characters at both ends
RWCSubString
subString(const char* cs, size_t start=0,
caseCompare = RWCString::exact);
const RWCSubString
subString(const char* cs, size_t start=0,
caseCompare = RWCString::exact) const;
Returns a substring representing the first occurence of the null-terminated string pointed to
by "cs". The first variant can be used as an lvalue. Case sensitivity is according to the
caseCompare argument; it defaults to RWCString::exact. If caseCompare is
RWCString::ignoreCase then this function is incompatible with MBCS strings. This
function is incompatible with cs strings with embedded nulls. This function may be
incompatible with cs MBCS strings.
void
toLower();
Changes all upper-case letters in self to lower-case, using the standard C library facilities
declared in <ctype.h>. This function is incompatible with MBCS strings.
void
toUpper();
Changes all lower-case letters in self to upper-case, using the standard C library facilities
declared in <ctype.h>. This function is incompatible with MBCS strings.