Tools.h++ Class Reference

Table Of Contents
first(wchar_t c) const;
Returns the index of the first occurrence of the wide character c in self. Returns RW_NPOS if there is no such
character or if there is an embedded null prior to finding c.
size_t
first(wchar_t c, size_t) const;
Returns the index of the first occurrence of the wide character c in self. Continues to search past embedded
nulls. Returns RW_NPOS if there is no such character.
size_t
first(const wchar_t* str) const;
Returns the index of the first occurrence 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.
size_t
first(const wchar_t* str, size_t N) const;
Returns the index of the first occurrence in self of any character in str. Exactly N characters in str are checked
including any embedded nulls so str must point to a buffer containing at least N wide characters. Returns
RW_NPOS if there is no match.
unsigned
hash(caseCompare = RWWString::exact) const;
Returns a suitable hash value.
size_t
index(const wchar_t* pat,size_t i=0,
caseCompare = RWWString::exact) const;
size_t
index(const RWWString& pat,size_t i=0,
caseCompare = RWWString::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) const;
Pattern matching. Starting with index i, searches for the first occurrence of the first patlen characters from 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.
RWWString&
insert(size_t pos, const wchar_t* cs);
Insert a copy of the null-terminated string cs into self at position pos. Returns a reference to self.
RWWString&
insert(size_t pos, const wchar_t* cs, size_t N);
Insert a copy of the first N wide characters of cs into self at position pos. Exactly N wide characters are
copied, including any embedded nulls. Hence, the buffer pointed to by cs must be at least N*sizeof(wchar_t)
bytes long. Returns a reference to self.
RWWString&