Tools.h++ Class Reference

Table Of Contents
RWCString::ignoreCase. If caseCompare is RWCString::exact, then this function works
for all string types. Otherwise, this function is incompatible with MBCS strings. This
function is incompatible with const char* strings with embedded nulls. This function may
be incompatible with const char* MBCS strings.
RWBoolean
contains(const char* str, caseCompare = RWCString::exact)
const;
RWBoolean
contains(const RWCString& cs,
caseCompare = RWCString::exact) const;
Pattern matching. Returns TRUE if str occurs in self. Case sensitivity is according to the
caseCompare argument, and may be RWCString::exact or RWCString::ignoreCase. If
caseCompare is RWCString::exact, then this function works for all string types.
Otherwise, this function is incompatible with MBCS strings. This function is incompatible
with const char* strings with embedded nulls. This function may be incompatible with
const char* MBCS strings.
const char*
data() const;
Access to the RWCString's data as a null terminated string. This datum is owned by the
RWCString and may not be deleted or changed. If the RWCString 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
first(char c) const;
Returns the index of the first occurence of the character c in self. Returns RW_NPOS if
there is no such character or if there is an embedded null prior to finding c. This function is
incompatible with strings with embedded nulls. This function is incompatible with MBCS
strings.
size_t
first(char c, size_t) const;
Returns the index of the first occurence of the character c in self. Continues to search past
embedded nulls. Returns RW_NPOS if there is no such character. This function is
incompatible with MBCS strings.
size_t
first(const char* str) const;
Returns the index of the first occurence in self of any character in str. Returns RW_NPOS
if there is no match or if there is an embedded null prior to finding any character from str.
This function is incompatible with strings with embedded nulls. This function may be
incompatible with MBCS strings.