Tools.h++ Manual

104011 Tandem Computers Incorporated 21-81
21
void resize(size_t n);
Changes the length of self to
n
, adding blanks or truncating as necessary.
RWCSubString strip(stripType s = trailing,
char c = ' ');
Returns a substring of self where the character
c
has been stripped off the
beginning, end, or both ends of the string. 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=exact);
const RWCSubString subString(const char* cs, size_t
start=0, caseCompare=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
.
void toLower();
Changes all upper-case letters in self to lower-case, using the standard C
library facilities declared in
<ctype.h>
.
void toUpper();
Changes all lower-case letters in self to upper-case, using the standard C
library facilities declared in
<ctype.h>
.
Static public
member functions
static size_t initialCapacity(size_t ic = 15);
Sets the minimum initial capacity of an
RWCString
, and returns the old value.
The initial setting is 15 characters. Larger values will use more memory, but
result in fewer resizes when concatenating or reading strings. Smaller values
will waste less memory, but result in more resizes.