Tools.h++ Manual

21-210 104011 Tandem Computers Incorporated
21
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 RWCString::ignoreCase
.
RWBoolean contains(const RWWString& cs,
caseCompare = exact) const;
RWBoolean contains(const wchar_t* str,
caseCompare = 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 may (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(wchar_t c) const;
Returns the index of the first occurence of the character c in self. Returns
RW_NPOS
if there is no such character.
unsigned hash(caseCompare = exact) const;
Returns a suitable hash value.
size_t index(const wchar_t* pat, size_t
i=0, caseCompare = exact) const;
size_t index(const RWWString& pat, size_t
i=0, caseCompare = exact) const;
Pattern matching. Starting with index i, searches for the first occurrence of
pat
in self and returns the index of the start of the match. Returns
RW_NPOS
if
there is no such pattern. Case sensitivity is according to the
caseCompare
argument; it defaults to
RWWString::exact
.
size_t index(const wchar_t* pat, size_t
patlen, size_t i, caseCompare)
const;
size_t index(const RWWString& pat, size_t
patlen, size_t i, caseCompare)