Tools.h++ Class Reference

Table Of Contents
append(const RWWString& cstr);
Append a copy of the string cstr to self. Returns a reference to self.
RWWString&
append(const RWWString& cstr, size_t N);
Append the first N characters or the length of cstr (whichever is less) of cstr to self. Returns a reference to
self.
size_t
binaryStoreSize() const;
Returns the number of bytes necessary to store the object using the global function:
RWFile& operator<<(RWFile&, const RWWString&);
size_t
capacity() const;
Return the current capacity of self. This is the number of characters the string can hold without resizing.
size_t
capacity(size_t capac);
Hint to the implementation to change the capacity of self to capac. Returns the actual capacity.
int
collate(const RWWString& str) const;
int
collate(const wchar_t* str) const;
Returns an int less then, greater than, or equal to zero, according to the result of calling the POSIX function
::wscoll() on self and the argument str. This supports locale-dependent collation.
int
compareTo(const RWWString& str,
caseCompare = RWWString::exact) const;
int
compareTo(const wchar_t* str,
caseCompare = RWWString::exact) const;
Returns an int less than, greater than, or equal to zero, according to the result of calling the Standard C library
function ::memcmp() on self and the argument str. Case sensitivity is according to the caseCompare
argument, and may be RWWString::exact or RWWString::ignoreCase.
RWBoolean
contains(const RWWString& cs,
caseCompare = RWWString::exact) const;
RWBoolean
contains(const wchar_t* str,
caseCompare = RWWString::exact) const;
Pattern matching. Returns TRUE if cs occurs in self. Case sensitivity is according to the caseCompare
argument, and may be RWWString::exact or RWWString::ignoreCase.
const wchar_t*
data() const;
Access to the RWWString's data as a null terminated string. This datum is owned by the RWWString and may
not be deleted or changed. If the RWWString object itself changes or goes out of scope, the pointer value
previously returned will become invalid. While the string is null-terminated, note that its length is still given
by the member function length(). That is, it may contain embedded nulls.
size_t