SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches

Stores and manipulates Unicode character sequences encoded as UTF-16 code units. More...

#include <rw/i18n/RWUString.h>

Inheritance diagram for RWUString:
RWBasicUString

Classes

class  Pad
 Iostream manipulator that supports the insertion of the contents of an RWUString into an output stream, with padding to fill the full field width of the stream. More...
 

Public Types

typedef RWUStringIterator code_point_iterator
 
typedef RWUConstStringIterator const_code_point_iterator
 
typedef std::reverse_iterator< const_code_point_iteratorconst_reverse_code_point_iterator
 
enum  NormalizationForm { FormNFD , FormNFKD , FormNFC , FormNFKC }
 
typedef std::reverse_iterator< code_point_iteratorreverse_code_point_iterator
 
enum  StripType {
  Leading , leading , Trailing , trailing ,
  Both , both
}
 
enum  Utf8 { UTF8 }
 
- Public Types inherited from RWBasicUString
typedef const RWUChar16const_iterator
 
typedef const RWUChar16const_reference
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 
typedef ptrdiff_t difference_type
 
enum  Duration { Transient , Persistent }
 
typedef RWUChar16iterator
 
typedef RWUChar16pointer
 
typedef RWUChar16reference
 
typedef std::reverse_iterator< iteratorreverse_iterator
 
typedef size_t size_type
 

Public Member Functions

 RWUString ()
 
 RWUString (const char *source, RWUToUnicodeConverter &converter=RWUToUnicodeConversionContext::getContext().getConverter())
 
 RWUString (const char *source, size_t length, Utf8)
 
 RWUString (const char *source, Utf8)
 
 RWUString (const RWBasicUString &source)
 
 RWUString (const RWCConstSubString &source, RWUToUnicodeConverter &converter=RWUToUnicodeConversionContext::getContext().getConverter())
 
 RWUString (const RWCString &source, RWUToUnicodeConverter &converter=RWUToUnicodeConversionContext::getContext().getConverter())
 
 RWUString (const RWCString &source, Utf8)
 
 RWUString (const RWCSubString &source, RWUToUnicodeConverter &converter=RWUToUnicodeConversionContext::getContext().getConverter())
 
 RWUString (const RWSize_T &initialCapacity)
 
 RWUString (const RWUChar16 *source, Duration duration=Transient)
 
 RWUString (const RWUChar16 *source, size_t length, Duration duration=Transient)
 
 RWUString (const RWUChar16 *source, size_t length, size_t initialCapacity)
 
 RWUString (const RWUChar32 *source)
 
 RWUString (const RWUChar32 *source, size_t length)
 
 RWUString (const RWUConstSubString &source)
 
 RWUString (const RWUString &source)
 
 RWUString (const RWUSubString &source)
 
 RWUString (const std::string &source, RWUToUnicodeConverter &converter=RWUToUnicodeConversionContext::getContext().getConverter())
 
 RWUString (RWUChar16 *clientBuffer, Deallocator *deallocator)
 
 RWUString (RWUChar16 *clientBuffer, size_t contentLength, Deallocator *deallocator)
 
 RWUString (RWUChar16 *clientBuffer, size_t contentLength, size_t bufferCapacity, Deallocator *deallocator)
 
 RWUString (RWUChar16 codeUnit, size_t repeat=1)
 
 RWUString (RWUChar32 codePoint, size_t repeat=1)
 
RWUStringappend (const RWBasicUString &source)
 
RWUStringappend (const RWBasicUString &source, size_t sourceOffset, size_t sourceLength)
 
RWUStringappend (const RWUChar16 *source)
 
RWUStringappend (const RWUChar16 *source, size_t sourceLength)
 
RWUStringappend (const RWUChar32 *source)
 
RWUStringappend (const RWUChar32 *source, size_t sourceLength)
 
RWUStringappend (const RWUConstSubString &source)
 
RWUStringappend (const RWUSubString &source)
 
RWUStringappend (RWUChar16 codeUnit, size_t repeat=1)
 
RWUStringappend (RWUChar32 codePoint, size_t repeat=1)
 
code_point_iterator beginCodePointIterator ()
 
const_code_point_iterator beginCodePointIterator () const
 
const_code_point_iterator cbeginCodePointIterator () const
 
const_code_point_iterator cendCodePointIterator () const
 
int compareCodePoints (const RWBasicUString &rhs) const
 
int compareCodePoints (const RWBasicUString &rhs, size_t rhsOffset, size_t rhsLength) const
 
int compareCodePoints (const RWUChar16 *rhs) const
 
int compareCodePoints (const RWUChar16 *rhs, size_t rhsLength) const
 
int compareCodePoints (const RWUChar32 *rhs) const
 
int compareCodePoints (const RWUChar32 *rhs, size_t rhsLength) const
 
int compareCodePoints (const RWUConstSubString &rhs) const
 
int compareCodePoints (const RWUSubString &rhs) const
 
int compareCodeUnits (const RWBasicUString &rhs) const
 
int compareCodeUnits (const RWBasicUString &rhs, size_t rhsOffset, size_t rhsLength) const
 
int compareCodeUnits (const RWUChar16 *rhs) const
 
int compareCodeUnits (const RWUChar16 *rhs, size_t rhsLength) const
 
int compareCodeUnits (const RWUConstSubString &rhs) const
 
int compareCodeUnits (const RWUSubString &rhs) const
 
int compareTo (const RWBasicUString &rhs) const
 
int compareTo (const RWBasicUString &rhs, size_t rhsOffset, size_t rhsLength) const
 
int compareTo (const RWUChar16 *rhs) const
 
int compareTo (const RWUChar16 *rhs, size_t rhsLength) const
 
int compareTo (const RWUChar32 *rhs) const
 
int compareTo (const RWUChar32 *rhs, size_t rhsLength) const
 
int compareTo (const RWUConstSubString &rhs) const
 
int compareTo (const RWUSubString &rhs) const
 
bool contains (const RWBasicUString &pattern) const
 
bool contains (const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
bool contains (const RWUChar16 *pattern) const
 
bool contains (const RWUChar16 *pattern, size_t patternLength) const
 
bool contains (const RWUChar32 *pattern) const
 
bool contains (const RWUChar32 *pattern, size_t patternLength) const
 
bool contains (const RWUConstSubString &pattern) const
 
bool contains (const RWUSubString &pattern) const
 
bool contains (RWUChar16 codeUnit) const
 
bool contains (RWUChar32 codePoint) const
 
bool contains (size_t offset, const RWBasicUString &pattern) const
 
bool contains (size_t offset, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
bool contains (size_t offset, const RWUChar16 *pattern) const
 
bool contains (size_t offset, const RWUChar16 *pattern, size_t patternLength) const
 
bool contains (size_t offset, const RWUChar32 *pattern) const
 
bool contains (size_t offset, const RWUChar32 *pattern, size_t patternLength) const
 
bool contains (size_t offset, const RWUConstSubString &pattern) const
 
bool contains (size_t offset, const RWUSubString &pattern) const
 
bool contains (size_t offset, RWUChar16 codeUnit) const
 
bool contains (size_t offset, RWUChar32 codePoint) const
 
bool contains (size_t offset, size_t length, const RWBasicUString &pattern) const
 
bool contains (size_t offset, size_t length, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
bool contains (size_t offset, size_t length, const RWUChar16 *pattern) const
 
bool contains (size_t offset, size_t length, const RWUChar16 *pattern, size_t patternLength) const
 
bool contains (size_t offset, size_t length, const RWUChar32 *pattern) const
 
bool contains (size_t offset, size_t length, const RWUChar32 *pattern, size_t patternLength) const
 
bool contains (size_t offset, size_t length, const RWUConstSubString &pattern) const
 
bool contains (size_t offset, size_t length, const RWUSubString &pattern) const
 
bool contains (size_t offset, size_t length, RWUChar16 codeUnit) const
 
bool contains (size_t offset, size_t length, RWUChar32 codePoint) const
 
const_reverse_code_point_iterator crbeginCodePointIterator () const
 
const_reverse_code_point_iterator crendCodePointIterator () const
 
code_point_iterator endCodePointIterator ()
 
const_code_point_iterator endCodePointIterator () const
 
size_t first (const RWBasicUString &codeUnitSet) const
 
size_t first (const RWUChar16 *codeUnitSet) const
 
size_t first (const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t first (const RWUChar32 *codePointSet) const
 
size_t first (const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t first (const RWUConstSubString &codeUnitSet) const
 
size_t first (const RWUSubString &codeUnitSet) const
 
size_t first (RWUChar16 codeUnit) const
 
size_t first (RWUChar32 codePoint) const
 
size_t first (size_t offset, const RWBasicUString &codeUnitSet) const
 
size_t first (size_t offset, const RWUChar16 *codeUnitSet) const
 
size_t first (size_t offset, const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t first (size_t offset, const RWUChar32 *codePointSet) const
 
size_t first (size_t offset, const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t first (size_t offset, const RWUConstSubString &codeUnitSet) const
 
size_t first (size_t offset, const RWUSubString &codeUnitSet) const
 
size_t first (size_t offset, RWUChar16 codeUnit) const
 
size_t first (size_t offset, RWUChar32 codePoint) const
 
size_t first (size_t offset, size_t length, const RWBasicUString &codeUnitSet) const
 
size_t first (size_t offset, size_t length, const RWUChar16 *codeUnitSet) const
 
size_t first (size_t offset, size_t length, const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t first (size_t offset, size_t length, const RWUChar32 *codePointSet) const
 
size_t first (size_t offset, size_t length, const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t first (size_t offset, size_t length, const RWUConstSubString &codeUnitSet) const
 
size_t first (size_t offset, size_t length, const RWUSubString &codeUnitSet) const
 
size_t first (size_t offset, size_t length, RWUChar16 codeUnit) const
 
size_t first (size_t offset, size_t length, RWUChar32 codePoint) const
 
RWUStringfoldCase (bool excludeSpecial=false)
 
size_t index (const RWBasicUString &pattern) const
 
size_t index (const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t index (const RWUChar16 *pattern) const
 
size_t index (const RWUChar16 *pattern, size_t patternLength) const
 
size_t index (const RWUChar32 *pattern) const
 
size_t index (const RWUChar32 *pattern, size_t patternLength) const
 
size_t index (const RWUConstSubString &pattern) const
 
size_t index (const RWUSubString &pattern) const
 
size_t index (RWUChar16 codeUnit) const
 
size_t index (RWUChar32 codePoint) const
 
size_t index (size_t offset, const RWBasicUString &pattern) const
 
size_t index (size_t offset, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t index (size_t offset, const RWUChar16 *pattern) const
 
size_t index (size_t offset, const RWUChar16 *pattern, size_t patternLength) const
 
size_t index (size_t offset, const RWUChar32 *pattern) const
 
size_t index (size_t offset, const RWUChar32 *pattern, size_t patternLength) const
 
size_t index (size_t offset, const RWUConstSubString &pattern) const
 
size_t index (size_t offset, const RWUSubString &pattern) const
 
size_t index (size_t offset, RWUChar16 codeUnit) const
 
size_t index (size_t offset, RWUChar32 codePoint) const
 
size_t index (size_t offset, size_t length, const RWBasicUString &pattern) const
 
size_t index (size_t offset, size_t length, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t index (size_t offset, size_t length, const RWUChar16 *pattern) const
 
size_t index (size_t offset, size_t length, const RWUChar16 *pattern, size_t patternLength) const
 
size_t index (size_t offset, size_t length, const RWUChar32 *pattern) const
 
size_t index (size_t offset, size_t length, const RWUChar32 *pattern, size_t patternLength) const
 
size_t index (size_t offset, size_t length, const RWUConstSubString &pattern) const
 
size_t index (size_t offset, size_t length, const RWUSubString &pattern) const
 
size_t index (size_t offset, size_t length, RWUChar16 codeUnit) const
 
size_t index (size_t offset, size_t length, RWUChar32 codePoint) const
 
RWUStringinsert (size_t offset, const RWBasicUString &source)
 
RWUStringinsert (size_t offset, const RWBasicUString &source, size_t sourceOffset, size_t sourceLength)
 
RWUStringinsert (size_t offset, const RWUChar16 *source)
 
RWUStringinsert (size_t offset, const RWUChar16 *source, size_t sourceLength)
 
RWUStringinsert (size_t offset, const RWUChar32 *source)
 
RWUStringinsert (size_t offset, const RWUChar32 *source, size_t sourceLength)
 
RWUStringinsert (size_t offset, const RWUConstSubString &source)
 
RWUStringinsert (size_t offset, const RWUSubString &source)
 
RWUStringinsert (size_t offset, RWUChar16 codeUnit, size_t repeat=1)
 
RWUStringinsert (size_t offset, RWUChar32 codePoint, size_t repeat=1)
 
size_t last (const RWBasicUString &codeUnitSet) const
 
size_t last (const RWUChar16 *codeUnitSet) const
 
size_t last (const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t last (const RWUChar32 *codePointSet) const
 
size_t last (const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t last (const RWUConstSubString &codeUnitSet) const
 
size_t last (const RWUSubString &codeUnitSet) const
 
size_t last (RWUChar16 codeUnit) const
 
size_t last (RWUChar32 codePoint) const
 
size_t last (size_t offset, const RWBasicUString &codeUnitSet) const
 
size_t last (size_t offset, const RWUChar16 *codeUnitSet) const
 
size_t last (size_t offset, const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t last (size_t offset, const RWUChar32 *codePointSet) const
 
size_t last (size_t offset, const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t last (size_t offset, const RWUConstSubString &codeUnitSet) const
 
size_t last (size_t offset, const RWUSubString &codeUnitSet) const
 
size_t last (size_t offset, RWUChar16 codeUnit) const
 
size_t last (size_t offset, RWUChar32 codePoint) const
 
size_t last (size_t offset, size_t length, const RWBasicUString &codeUnitSet) const
 
size_t last (size_t offset, size_t length, const RWUChar16 *codeUnitSet) const
 
size_t last (size_t offset, size_t length, const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t last (size_t offset, size_t length, const RWUChar32 *codePointSet) const
 
size_t last (size_t offset, size_t length, const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t last (size_t offset, size_t length, const RWUConstSubString &codeUnitSet) const
 
size_t last (size_t offset, size_t length, const RWUSubString &codeUnitSet) const
 
size_t last (size_t offset, size_t length, RWUChar16 codeUnit) const
 
size_t last (size_t offset, size_t length, RWUChar32 codePoint) const
 
RWUStringnormalize (NormalizationForm form=FormNFC)
 
RWUChar16operator() (size_t offset)
 
RWUChar16 operator() (size_t offset) const
 
RWUSubString operator() (size_t offset, size_t length)
 
RWUConstSubString operator() (size_t offset, size_t length) const
 
RWUStringoperator+= (const RWBasicUString &source)
 
RWUStringoperator+= (const RWUChar16 *source)
 
RWUStringoperator+= (const RWUChar32 *source)
 
RWUStringoperator+= (const RWUConstSubString &source)
 
RWUStringoperator+= (const RWUSubString &source)
 
RWUStringoperator+= (RWUChar16 codeUnit)
 
RWUStringoperator+= (RWUChar32 codePoint)
 
RWUStringoperator= (const char *source)
 
RWUStringoperator= (const RWBasicUString &source)
 
RWUStringoperator= (const RWUChar16 *source)
 
RWUStringoperator= (const RWUChar32 *source)
 
RWUStringoperator= (const RWUConstSubString &source)
 
RWUStringoperator= (const RWUString &source)
 
RWUStringoperator= (const RWUSubString &source)
 
RWUStringoperator= (RWUChar16 codeUnit)
 
RWUStringoperator= (RWUChar32 codePoint)
 
RWUStringprepend (const RWBasicUString &source)
 
RWUStringprepend (const RWBasicUString &source, size_t sourceOffset, size_t sourceLength)
 
RWUStringprepend (const RWUChar16 *source)
 
RWUStringprepend (const RWUChar16 *source, size_t sourceLength)
 
RWUStringprepend (const RWUChar32 *source)
 
RWUStringprepend (const RWUChar32 *source, size_t sourceLength)
 
RWUStringprepend (const RWUConstSubString &source)
 
RWUStringprepend (const RWUSubString &source)
 
RWUStringprepend (RWUChar16 codeUnit, size_t repeat=1)
 
RWUStringprepend (RWUChar32 codePoint, size_t repeat=1)
 
reverse_code_point_iterator rbeginCodePointIterator ()
 
const_reverse_code_point_iterator rbeginCodePointIterator () const
 
RWUStringremove (size_t offset, size_t length)
 
RWUStringremove (size_t offset=0)
 
reverse_code_point_iterator rendCodePointIterator ()
 
const_reverse_code_point_iterator rendCodePointIterator () const
 
RWUStringreplace (size_t offset, size_t length, const RWBasicUString &source)
 
RWUStringreplace (size_t offset, size_t length, const RWBasicUString &source, size_t sourceOffset, size_t sourceLength)
 
RWUStringreplace (size_t offset, size_t length, const RWUChar16 *source)
 
RWUStringreplace (size_t offset, size_t length, const RWUChar16 *source, size_t sourceLength)
 
RWUStringreplace (size_t offset, size_t length, const RWUChar32 *source)
 
RWUStringreplace (size_t offset, size_t length, const RWUChar32 *source, size_t sourceLength)
 
RWUStringreplace (size_t offset, size_t length, const RWUConstSubString &source)
 
RWUStringreplace (size_t offset, size_t length, const RWUSubString &source)
 
RWUStringreplace (size_t offset, size_t length, RWUChar16 codeUnit, size_t repeat=1)
 
RWUStringreplace (size_t offset, size_t length, RWUChar32 codePoint, size_t repeat=1)
 
size_t rindex (const RWBasicUString &pattern) const
 
size_t rindex (const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t rindex (const RWUChar16 *pattern) const
 
size_t rindex (const RWUChar16 *pattern, size_t patternLength) const
 
size_t rindex (const RWUChar32 *pattern) const
 
size_t rindex (const RWUChar32 *pattern, size_t patternLength) const
 
size_t rindex (const RWUConstSubString &pattern) const
 
size_t rindex (const RWUSubString &pattern) const
 
size_t rindex (RWUChar16 codeUnit) const
 
size_t rindex (RWUChar32 codePoint) const
 
size_t rindex (size_t offset, const RWBasicUString &pattern) const
 
size_t rindex (size_t offset, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t rindex (size_t offset, const RWUChar16 *pattern) const
 
size_t rindex (size_t offset, const RWUChar16 *pattern, size_t patternLength) const
 
size_t rindex (size_t offset, const RWUChar32 *pattern) const
 
size_t rindex (size_t offset, const RWUChar32 *pattern, size_t patternLength) const
 
size_t rindex (size_t offset, const RWUConstSubString &pattern) const
 
size_t rindex (size_t offset, const RWUSubString &pattern) const
 
size_t rindex (size_t offset, RWUChar16 codeUnit) const
 
size_t rindex (size_t offset, RWUChar32 codePoint) const
 
size_t rindex (size_t offset, size_t length, const RWBasicUString &pattern) const
 
size_t rindex (size_t offset, size_t length, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t rindex (size_t offset, size_t length, const RWUChar16 *pattern) const
 
size_t rindex (size_t offset, size_t length, const RWUChar16 *pattern, size_t patternLength) const
 
size_t rindex (size_t offset, size_t length, const RWUChar32 *pattern) const
 
size_t rindex (size_t offset, size_t length, const RWUChar32 *pattern, size_t patternLength) const
 
size_t rindex (size_t offset, size_t length, const RWUConstSubString &pattern) const
 
size_t rindex (size_t offset, size_t length, const RWUSubString &pattern) const
 
size_t rindex (size_t offset, size_t length, RWUChar16 codeUnit) const
 
size_t rindex (size_t offset, size_t length, RWUChar32 codeUnit) const
 
RWUSubString strip (StripType stripType=Trailing, RWUChar32 codePoint=static_cast< RWUChar32 >(0x0020))
 
RWUConstSubString strip (StripType stripType=Trailing, RWUChar32 codePoint=static_cast< RWUChar32 >(0x0020)) const
 
RWUSubString subString (const RWUString &pattern, size_t offset=0)
 
RWUConstSubString subString (const RWUString &pattern, size_t offset=0) const
 
RWCString toBytes (RWUFromUnicodeConverter &converter=RWUFromUnicodeConversionContext::getContext().getConverter()) const
 
RWUStringtoLower ()
 
RWUStringtoLower (const RWULocale &locale)
 
RWUStringtoTitle ()
 
RWUStringtoTitle (const RWULocale &locale)
 
RWUStringtoUpper ()
 
RWUStringtoUpper (const RWULocale &locale)
 
RWUStringunescape ()
 
- Public Member Functions inherited from RWBasicUString
 RWBasicUString ()
 
 RWBasicUString (const char *utf8Source)
 
 RWBasicUString (const char *utf8Source, size_t length)
 
 RWBasicUString (const RWBasicUString &source)
 
 RWBasicUString (const RWCString &utf8Source)
 
 RWBasicUString (const RWSize_T &initialCapacity)
 
 RWBasicUString (const RWUChar16 *source, Duration duration=Transient)
 
 RWBasicUString (const RWUChar16 *source, size_t sourceLength, Duration duration=Transient)
 
 RWBasicUString (const RWUChar16 *source, size_t sourceLength, size_t initialCapacity)
 
 RWBasicUString (const RWUChar32 *source)
 
 RWBasicUString (const RWUChar32 *source, size_t sourceLength)
 
 RWBasicUString (RWBasicUString &&rhs)
 
 RWBasicUString (RWUChar16 *clientBuffer, Deallocator *deallocator)
 
 RWBasicUString (RWUChar16 *clientBuffer, size_t contentLength, Deallocator *deallocator)
 
 RWBasicUString (RWUChar16 *clientBuffer, size_t contentLength, size_t bufferCapacity, Deallocator *deallocator)
 
 RWBasicUString (RWUChar16 codeUnit, size_t repeat=1)
 
 RWBasicUString (RWUChar32 codePoint, size_t repeat=1)
 
 ~RWBasicUString ()
 
RWBasicUStringappend (const RWBasicUString &source)
 
RWBasicUStringappend (const RWBasicUString &source, size_t sourceOffset, size_t sourceLength)
 
RWBasicUStringappend (const RWUChar16 *source)
 
RWBasicUStringappend (const RWUChar16 *source, size_t sourceLength)
 
RWBasicUStringappend (const RWUChar32 *source)
 
RWBasicUStringappend (const RWUChar32 *source, size_t sourceLength)
 
RWBasicUStringappend (RWUChar16 codeUnit, size_t repeat=1)
 
RWBasicUStringappend (RWUChar32 codePoint, size_t repeat=1)
 
iterator begin ()
 
const_iterator begin () const
 
RWspace binaryStoreSize () const
 
size_t boundsCheckIndex (size_t offset) const
 
size_t boundsCheckLength (size_t offset, size_t length) const
 
size_t capacity () const
 
size_t capacity (size_t newCapacity)
 
const_iterator cbegin () const
 
const_iterator cend () const
 
size_t codePointLength () const
 
size_t codeUnitLength () const
 
int compareCodePoints (const RWBasicUString &rhs) const
 
int compareCodePoints (const RWBasicUString &rhs, size_t rhsOffset, size_t rhsLength) const
 
int compareCodePoints (const RWUChar16 *rhs) const
 
int compareCodePoints (const RWUChar16 *rhs, size_t rhsLength) const
 
int compareCodePoints (const RWUChar32 *rhs) const
 
int compareCodePoints (const RWUChar32 *rhs, size_t rhsLength) const
 
int compareCodeUnits (const RWBasicUString &rhs) const
 
int compareCodeUnits (const RWBasicUString &rhs, size_t rhsOffset, size_t rhsLength) const
 
int compareCodeUnits (const RWUChar16 *rhs) const
 
int compareCodeUnits (const RWUChar16 *rhs, size_t rhsLength) const
 
int compareTo (const RWBasicUString &rhs) const
 
int compareTo (const RWBasicUString &rhs, size_t rhsOffset, size_t rhsLength) const
 
int compareTo (const RWUChar16 *rhs) const
 
int compareTo (const RWUChar16 *rhs, size_t rhsLength) const
 
int compareTo (const RWUChar32 *rhs) const
 
int compareTo (const RWUChar32 *rhs, size_t rhsLength) const
 
bool contains (const RWBasicUString &pattern) const
 
bool contains (const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
bool contains (const RWUChar16 *pattern) const
 
bool contains (const RWUChar16 *pattern, size_t patternLength) const
 
bool contains (const RWUChar32 *pattern) const
 
bool contains (const RWUChar32 *pattern, size_t patternLength) const
 
bool contains (RWUChar16 codeUnit) const
 
bool contains (RWUChar32 codePoint) const
 
bool contains (size_t offset, const RWBasicUString &pattern) const
 
bool contains (size_t offset, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
bool contains (size_t offset, const RWUChar16 *pattern) const
 
bool contains (size_t offset, const RWUChar16 *pattern, size_t patternLength) const
 
bool contains (size_t offset, const RWUChar32 *pattern) const
 
bool contains (size_t offset, const RWUChar32 *pattern, size_t patternLength) const
 
bool contains (size_t offset, RWUChar16 codeUnit) const
 
bool contains (size_t offset, RWUChar32 codePoint) const
 
bool contains (size_t offset, size_t length, const RWBasicUString &pattern) const
 
bool contains (size_t offset, size_t length, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
bool contains (size_t offset, size_t length, const RWUChar16 *pattern) const
 
bool contains (size_t offset, size_t length, const RWUChar16 *pattern, size_t patternLength) const
 
bool contains (size_t offset, size_t length, const RWUChar32 *pattern) const
 
bool contains (size_t offset, size_t length, const RWUChar32 *pattern, size_t patternLength) const
 
bool contains (size_t offset, size_t length, RWUChar16 codeUnit) const
 
bool contains (size_t offset, size_t length, RWUChar32 codePoint) const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
const RWUChar16data () const
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
bool equals (const RWBasicUString &array) const
 
size_t first (const RWBasicUString &codeUnitSet) const
 
size_t first (const RWUChar16 *codeUnitSet) const
 
size_t first (const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t first (const RWUChar32 *codePointSet) const
 
size_t first (const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t first (RWUChar16 codeUnit) const
 
size_t first (RWUChar32 codePoint) const
 
size_t first (size_t offset, const RWBasicUString &codeUnitSet) const
 
size_t first (size_t offset, const RWUChar16 *codeUnitSet) const
 
size_t first (size_t offset, const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t first (size_t offset, const RWUChar32 *codePointSet) const
 
size_t first (size_t offset, const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t first (size_t offset, RWUChar16 codeUnit) const
 
size_t first (size_t offset, RWUChar32 codePoint) const
 
size_t first (size_t offset, size_t length, const RWBasicUString &codeUnitSet) const
 
size_t first (size_t offset, size_t length, const RWUChar16 *codeUnitSet) const
 
size_t first (size_t offset, size_t length, const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t first (size_t offset, size_t length, const RWUChar32 *codePointSet) const
 
size_t first (size_t offset, size_t length, const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t first (size_t offset, size_t length, RWUChar16 codeUnit) const
 
size_t first (size_t offset, size_t length, RWUChar32 codePoint) const
 
unsigned long hash () const
 
size_t index (const RWBasicUString &pattern) const
 
size_t index (const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t index (const RWUChar16 *pattern) const
 
size_t index (const RWUChar16 *pattern, size_t patternLength) const
 
size_t index (const RWUChar32 *pattern) const
 
size_t index (const RWUChar32 *pattern, size_t patternLength) const
 
size_t index (RWUChar16 codeUnit) const
 
size_t index (RWUChar32 codePoint) const
 
size_t index (size_t offset, const RWBasicUString &pattern) const
 
size_t index (size_t offset, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t index (size_t offset, const RWUChar16 *pattern) const
 
size_t index (size_t offset, const RWUChar16 *pattern, size_t patternLength) const
 
size_t index (size_t offset, const RWUChar32 *pattern) const
 
size_t index (size_t offset, const RWUChar32 *pattern, size_t patternLength) const
 
size_t index (size_t offset, RWUChar16 codeUnit) const
 
size_t index (size_t offset, RWUChar32 codePoint) const
 
size_t index (size_t offset, size_t length, const RWBasicUString &pattern) const
 
size_t index (size_t offset, size_t length, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t index (size_t offset, size_t length, const RWUChar16 *pattern) const
 
size_t index (size_t offset, size_t length, const RWUChar16 *pattern, size_t patternLength) const
 
size_t index (size_t offset, size_t length, const RWUChar32 *pattern) const
 
size_t index (size_t offset, size_t length, const RWUChar32 *pattern, size_t patternLength) const
 
size_t index (size_t offset, size_t length, RWUChar16 codeUnit) const
 
size_t index (size_t offset, size_t length, RWUChar32 codePoint) const
 
RWBasicUStringinsert (size_t offset, const RWBasicUString &source)
 
RWBasicUStringinsert (size_t offset, const RWBasicUString &source, size_t sourceOffset, size_t sourceLength)
 
RWBasicUStringinsert (size_t offset, const RWUChar16 *source)
 
RWBasicUStringinsert (size_t offset, const RWUChar16 *source, size_t sourceLength)
 
RWBasicUStringinsert (size_t offset, const RWUChar32 *source)
 
RWBasicUStringinsert (size_t offset, const RWUChar32 *source, size_t sourceLength)
 
RWBasicUStringinsert (size_t offset, RWUChar16 codeUnit, size_t repeat=1)
 
RWBasicUStringinsert (size_t offset, RWUChar32 codePoint, size_t repeat=1)
 
bool isNull () const
 
size_t last (const RWBasicUString &codeUnitSet) const
 
size_t last (const RWUChar16 *codeUnitSet) const
 
size_t last (const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t last (const RWUChar32 *codePointSet) const
 
size_t last (const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t last (RWUChar16 codeUnit) const
 
size_t last (RWUChar32 codePoint) const
 
size_t last (size_t offset, const RWBasicUString &codeUnitSet) const
 
size_t last (size_t offset, const RWUChar16 *codeUnitSet) const
 
size_t last (size_t offset, const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t last (size_t offset, const RWUChar32 *codePointSet) const
 
size_t last (size_t offset, const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t last (size_t offset, RWUChar16 codeUnit) const
 
size_t last (size_t offset, RWUChar32 codePoint) const
 
size_t last (size_t offset, size_t length, const RWBasicUString &codeUnitSet) const
 
size_t last (size_t offset, size_t length, const RWUChar16 *codeUnitSet) const
 
size_t last (size_t offset, size_t length, const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t last (size_t offset, size_t length, const RWUChar32 *codePointSet) const
 
size_t last (size_t offset, size_t length, const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t last (size_t offset, size_t length, RWUChar16 codeUnit) const
 
size_t last (size_t offset, size_t length, RWUChar32 codePoint) const
 
size_t length () const
 
size_t max_size () const
 
 operator const RWUChar16 * () const
 
RWUChar16operator() (size_t offset)
 
RWUChar16 operator() (size_t offset) const
 
RWBasicUStringoperator+= (const RWBasicUString &source)
 
RWBasicUStringoperator+= (const RWUChar16 *source)
 
RWBasicUStringoperator+= (const RWUChar32 *source)
 
RWBasicUStringoperator+= (RWUChar16 codeUnit)
 
RWBasicUStringoperator+= (RWUChar32 codePoint)
 
RWBasicUStringoperator= (const RWBasicUString &source)
 
RWBasicUStringoperator= (const RWUChar16 *source)
 
RWBasicUStringoperator= (const RWUChar32 *source)
 
RWBasicUStringoperator= (RWBasicUString &&rhs)
 
RWBasicUStringoperator= (RWUChar16 codeUnit)
 
RWBasicUStringoperator= (RWUChar32 codePoint)
 
RWUChar16operator[] (int offset)
 
RWUChar16 operator[] (int offset) const
 
RWUChar16operator[] (long long offset)
 
RWUChar16 operator[] (long long offset) const
 
RWUChar16operator[] (long offset)
 
RWUChar16 operator[] (long offset) const
 
RWUChar16operator[] (short offset)
 
RWUChar16 operator[] (short offset) const
 
RWUChar16operator[] (unsigned int offset)
 
RWUChar16 operator[] (unsigned int offset) const
 
RWUChar16operator[] (unsigned long long offset)
 
RWUChar16 operator[] (unsigned long long offset) const
 
RWUChar16operator[] (unsigned long offset)
 
RWUChar16 operator[] (unsigned long offset) const
 
RWUChar16operator[] (unsigned short offset)
 
RWUChar16 operator[] (unsigned short offset) const
 
RWBasicUStringprepend (const RWBasicUString &source)
 
RWBasicUStringprepend (const RWBasicUString &source, size_t sourceOffset, size_t sourceLength)
 
RWBasicUStringprepend (const RWUChar16 *source)
 
RWBasicUStringprepend (const RWUChar16 *source, size_t sourceLength)
 
RWBasicUStringprepend (const RWUChar32 *source)
 
RWBasicUStringprepend (const RWUChar32 *source, size_t sourceLength)
 
RWBasicUStringprepend (RWUChar16 codeUnit, size_t repeat=1)
 
RWBasicUStringprepend (RWUChar32 codePoint, size_t repeat=1)
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
RWBasicUStringremove (size_t offset, size_t length)
 
RWBasicUStringremove (size_t offset=0)
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
RWBasicUStringreplace (size_t offset, size_t length, const RWBasicUString &source)
 
RWBasicUStringreplace (size_t offset, size_t length, const RWBasicUString &source, size_t sourceOffset, size_t sourceLength)
 
RWBasicUStringreplace (size_t offset, size_t length, const RWUChar16 *source)
 
RWBasicUStringreplace (size_t offset, size_t length, const RWUChar16 *source, size_t sourceLength)
 
RWBasicUStringreplace (size_t offset, size_t length, const RWUChar32 *source)
 
RWBasicUStringreplace (size_t offset, size_t length, const RWUChar32 *source, size_t sourceLength)
 
RWBasicUStringreplace (size_t offset, size_t length, RWUChar16 codeUnit, size_t repeat=1)
 
RWBasicUStringreplace (size_t offset, size_t length, RWUChar32 codePoint, size_t repeat=1)
 
void resize (size_t newCodePointLength, RWUChar32 codePoint)
 
void resize (size_t newCodeUnitLength, RWUChar16 codeUnit)
 
void restoreFrom (RWFile &file)
 
void restoreFrom (RWvistream &vis)
 
size_t rindex (const RWBasicUString &pattern) const
 
size_t rindex (const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t rindex (const RWUChar16 *pattern) const
 
size_t rindex (const RWUChar16 *pattern, size_t patternLength) const
 
size_t rindex (const RWUChar32 *pattern) const
 
size_t rindex (const RWUChar32 *pattern, size_t patternLength) const
 
size_t rindex (RWUChar16 codeUnit) const
 
size_t rindex (RWUChar32 codePoint) const
 
size_t rindex (size_t offset, const RWBasicUString &pattern) const
 
size_t rindex (size_t offset, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t rindex (size_t offset, const RWUChar16 *pattern) const
 
size_t rindex (size_t offset, const RWUChar16 *pattern, size_t patternLength) const
 
size_t rindex (size_t offset, const RWUChar32 *pattern) const
 
size_t rindex (size_t offset, const RWUChar32 *pattern, size_t patternLength) const
 
size_t rindex (size_t offset, RWUChar16 codeUnit) const
 
size_t rindex (size_t offset, RWUChar32 codePoint) const
 
size_t rindex (size_t offset, size_t length, const RWBasicUString &pattern) const
 
size_t rindex (size_t offset, size_t length, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t rindex (size_t offset, size_t length, const RWUChar16 *pattern) const
 
size_t rindex (size_t offset, size_t length, const RWUChar16 *pattern, size_t patternLength) const
 
size_t rindex (size_t offset, size_t length, const RWUChar32 *pattern) const
 
size_t rindex (size_t offset, size_t length, const RWUChar32 *pattern, size_t patternLength) const
 
size_t rindex (size_t offset, size_t length, RWUChar16 codeUnit) const
 
size_t rindex (size_t offset, size_t length, RWUChar32 codeUnit) const
 
void saveOn (RWFile &file) const
 
void saveOn (RWvostream &vos) const
 
size_t size () const
 
size_t skipLeading (RWUChar32 codePoint=static_cast< RWUChar32 >(0x0020)) const
 
size_t skipTrailing (RWUChar32 codePoint=static_cast< RWUChar32 >(0x0020)) const
 
void swap (RWBasicUString &ustr)
 
std::basic_string< RWUChar32toUtf32 () const
 
RWCString toUtf8 (size_t numCodePoints=RW_NPOS) const
 
RWWString toWide () const
 

Static Public Member Functions

static RWUString foldCase (const RWUString &source, bool excludeSpecial=false)
 
static RWCString toBytes (const RWUChar16 *source, size_t length, RWUFromUnicodeConverter &converter=RWUFromUnicodeConversionContext::getContext().getConverter())
 
static RWUString toLower (const RWUString &source, const RWULocale &locale)
 
static RWUString toTitle (const RWUString &source, const RWULocale &locale)
 
static RWUString toUpper (const RWUString &source, const RWULocale &locale)
 
static RWUString unescape (const RWUString &source)
 
- Static Public Member Functions inherited from RWBasicUString
static size_t codePointLength (const RWUChar16 *array)
 
static size_t codePointLength (const RWUChar16 *array, size_t length)
 
static size_t codePointLength (const RWUChar32 *array)
 
static size_t codeUnitLength (const RWUChar16 *array)
 
static size_t codeUnitLength (const RWUChar32 *array)
 
static size_t codeUnitLength (const RWUChar32 *array, size_t length)
 
static RWUChar32 computeCodePointValue (RWUChar16 highSurrogate, RWUChar16 lowSurrogate)
 
static DeallocatorgetNullDeallocator ()
 
static RWUChar16 highSurrogate (RWUChar32 codePoint)
 
static bool isHighSurrogate (RWUChar16 codeUnit)
 
static bool isLowSurrogate (RWUChar16 codeUnit)
 
static bool isUnicodeCharacter (RWUChar32 codePoint)
 
static RWUChar16 lowSurrogate (RWUChar32 codePoint)
 
static bool requiresSurrogatePair (RWUChar32 codeUnit)
 
static void USE_DELETE (RWUChar16 *p)
 
static void USE_FREE (RWUChar16 *p)
 
static void USE_NONE (RWUChar16 *p)
 
static RWUChar32 validateCodePoint (RWUChar32 codePoint)
 

Related Symbols

(Note that these are not member symbols.)

bool operator!= (const RWUChar16 *lhs, const RWUString &rhs)
 
bool operator!= (const RWUChar32 *lhs, const RWUString &rhs)
 
bool operator!= (const RWUConstSubString &lhs, const RWUString &rhs)
 
bool operator!= (const RWUConstSubString &lhs, const RWUSubString &rhs)
 
bool operator!= (const RWUString &lhs, const RWUChar16 *rhs)
 
bool operator!= (const RWUString &lhs, const RWUChar32 *rhs)
 
bool operator!= (const RWUString &lhs, const RWUConstSubString &rhs)
 
bool operator!= (const RWUString &lhs, const RWUString &rhs)
 
bool operator!= (const RWUString &lhs, const RWUSubString &rhs)
 
bool operator!= (const RWUSubString &lhs, const RWUConstSubString &rhs)
 
bool operator!= (const RWUSubString &lhs, const RWUString &rhs)
 
RWUString operator+ (const RWUChar16 *lhs, const RWUString &rhs)
 
RWUString operator+ (const RWUConstSubString &lhs, const RWUString &rhs)
 
RWUString operator+ (const RWUString &lhs, const RWUChar16 *rhs)
 
RWUString operator+ (const RWUString &lhs, const RWUConstSubString &rhs)
 
RWUString operator+ (const RWUString &lhs, const RWUString &rhs)
 
RWUString operator+ (const RWUString &lhs, const RWUSubString &rhs)
 
RWUString operator+ (const RWUSubString &lhs, const RWUString &rhs)
 
bool operator< (const RWUChar16 *lhs, const RWUString &rhs)
 
bool operator< (const RWUChar32 *lhs, const RWUString &rhs)
 
bool operator< (const RWUConstSubString &lhs, const RWUString &rhs)
 
bool operator< (const RWUConstSubString &lhs, const RWUSubString &rhs)
 
bool operator< (const RWUString &lhs, const RWUChar16 *rhs)
 
bool operator< (const RWUString &lhs, const RWUChar32 *rhs)
 
bool operator< (const RWUString &lhs, const RWUConstSubString &rhs)
 
bool operator< (const RWUString &lhs, const RWUString &rhs)
 
bool operator< (const RWUString &lhs, const RWUSubString &rhs)
 
bool operator< (const RWUSubString &lhs, const RWUConstSubString &rhs)
 
bool operator< (const RWUSubString &lhs, const RWUString &rhs)
 
std::ostream & operator<< (std::ostream &os, const RWUString &ustr)
 
std::ostream & operator<< (std::ostream &os, const RWUString::Pad &pad)
 
bool operator<= (const RWUChar16 *lhs, const RWUString &rhs)
 
bool operator<= (const RWUChar32 *lhs, const RWUString &rhs)
 
bool operator<= (const RWUConstSubString &lhs, const RWUString &rhs)
 
bool operator<= (const RWUConstSubString &lhs, const RWUSubString &rhs)
 
bool operator<= (const RWUString &lhs, const RWUChar16 *rhs)
 
bool operator<= (const RWUString &lhs, const RWUChar32 *rhs)
 
bool operator<= (const RWUString &lhs, const RWUConstSubString &rhs)
 
bool operator<= (const RWUString &lhs, const RWUString &rhs)
 
bool operator<= (const RWUString &lhs, const RWUSubString &rhs)
 
bool operator<= (const RWUSubString &lhs, const RWUConstSubString &rhs)
 
bool operator<= (const RWUSubString &lhs, const RWUString &rhs)
 
bool operator== (const RWUChar16 *lhs, const RWUString &rhs)
 
bool operator== (const RWUChar32 *lhs, const RWUString &rhs)
 
bool operator== (const RWUConstSubString &lhs, const RWUString &rhs)
 
bool operator== (const RWUConstSubString &lhs, const RWUSubString &rhs)
 
bool operator== (const RWUString &lhs, const RWUChar16 *rhs)
 
bool operator== (const RWUString &lhs, const RWUChar32 *rhs)
 
bool operator== (const RWUString &lhs, const RWUConstSubString &rhs)
 
bool operator== (const RWUString &lhs, const RWUString &rhs)
 
bool operator== (const RWUString &lhs, const RWUSubString &rhs)
 
bool operator== (const RWUSubString &lhs, const RWUConstSubString &rhs)
 
bool operator== (const RWUSubString &lhs, const RWUString &rhs)
 
bool operator> (const RWUChar16 *lhs, const RWUString &rhs)
 
bool operator> (const RWUChar32 *lhs, const RWUString &rhs)
 
bool operator> (const RWUConstSubString &lhs, const RWUString &rhs)
 
bool operator> (const RWUConstSubString &lhs, const RWUSubString &rhs)
 
bool operator> (const RWUString &lhs, const RWUChar16 *rhs)
 
bool operator> (const RWUString &lhs, const RWUChar32 *rhs)
 
bool operator> (const RWUString &lhs, const RWUConstSubString &rhs)
 
bool operator> (const RWUString &lhs, const RWUString &rhs)
 
bool operator> (const RWUString &lhs, const RWUSubString &rhs)
 
bool operator> (const RWUSubString &lhs, const RWUConstSubString &rhs)
 
bool operator> (const RWUSubString &lhs, const RWUString &rhs)
 
bool operator>= (const RWUChar16 *lhs, const RWUString &rhs)
 
bool operator>= (const RWUChar32 *lhs, const RWUString &rhs)
 
bool operator>= (const RWUConstSubString &lhs, const RWUString &rhs)
 
bool operator>= (const RWUConstSubString &lhs, const RWUSubString &rhs)
 
bool operator>= (const RWUString &lhs, const RWUChar16 *rhs)
 
bool operator>= (const RWUString &lhs, const RWUChar32 *rhs)
 
bool operator>= (const RWUString &lhs, const RWUConstSubString &rhs)
 
bool operator>= (const RWUString &lhs, const RWUString &rhs)
 
bool operator>= (const RWUString &lhs, const RWUSubString &rhs)
 
bool operator>= (const RWUSubString &lhs, const RWUConstSubString &rhs)
 
bool operator>= (const RWUSubString &lhs, const RWUString &rhs)
 
std::istream & operator>> (std::istream &is, RWUString &ustr)
 

Additional Inherited Members

- Static Public Attributes inherited from RWBasicUString
static const RWUChar32 DefaultFillCharacter
 

Detailed Description

RWUString stores and manipulates Unicode character sequences encoded as UTF-16 code units. This class extends RWBasicUString in the Essential Tools Module.

Unicode is a coded character set. It assigns numeric code point values from 0 to 0x10FFFF to abstract characters. UTF-16 is a character encoding form for Unicode in which a single 21-bit Unicode code point is represented using one or two 16-bit integer code units. UTF-16 strikes a balance between ease of use and efficient use of memory. Most characters can be represented with a single 16-bit code unit. Only characters in the range 0x10000 to 0x10FFFF must be represented with a surrogate pair of two UTF-16 code units.

Null Termination

One or more code units in a Unicode character string can be zero. Hence, a Unicode character string may not be null-terminated. In practice, it is a rare Unicode string that uses embedded nulls, but you should program defensively. RWUString handles embedded nulls properly.

Narrow Characters and Other Non-Unicode Strings

RWUString does not deal directly with non-Unicode characters or character strings such as char, char*, wchar_t, wchar_t*, RWCString, RWWString, std::string, std::wstring, and so on. If a non-Unicode character or string must be used with an RWUString, the non-Unicode character or string must be converted into Unicode first. The conversion can be done explicitly through the use of an RWUToUnicodeConverter, or implicitly through the use of an RWUToUnicodeConversionContext.

Code Units, Code Points, and Characters

The characteristics of UTF-16 imply that the number of 16-bit code units in a string may differ from the number of code points. Furthermore, the nature of Unicode implies that the number of code points may differ from the number of characters, as interpreted by the end user, since Unicode characters can be decomposed into multiple code points that correspond to the various accents or glyphs that comprise each character. The following methods and classes help you work with these concepts:

  • The length() method returns the number of UTF-16 code units in a string.
  • The codePointLength() method returns the number of code points.
  • An RWUBreakSearch can be used to iterate over the characters of a string, in the context of a particular locale.

Note that codePointLength() may be slower than the length() method because codePointLength() must traverse the string to find code points that arise from surrogate code unit pairs. Since the majority of code points in the current Unicode Standard do not require a surrogate representation, many applications can rely on length() to determine the number of code points.

Lexical vs. Logical Comparison

RWUString performs comparisons on a lexical basis. Methods such as compareTo(), contains(), first(), last(), index(), rindex(), strip(), and the global comparison operators compare the bit values of individual code units, not the logical values of code points or characters. In contrast, RWUCollator performs comparisons on a logical basis, following the conventions specified in a given locale. The logical comparisons made by RWUCollator are more likely to match an end user's expectations regarding string equality and ordering. The lexical comparisons made by RWUString, however, are likely to be faster. If two strings contain characters from the same script, and are in the same normalization form, lexical comparisons may be adequate for many purposes.

Parameters of Type RWUChar*

Do not pass a NULL pointer value for parameters of type const RWUChar16*. Doing so will produce erroneous behavior and will trigger an assertion failure in debug builds of the library.

Note
Do not pass a NULL pointer value for parameters of type const RWUChar16*.
Example
#include <rw/i18n/RWUConversionContext.h>
#include <rw/i18n/RWUString.h>
#include <iostream>
using std::cout;
using std::endl;
int main() {
// Indicate that source and target strings are
// encoded as ISO8859-1.
RWUConversionContext context("ISO8859-1");
// Initialize a Unicode string.
RWUString str("source pro internationalization module");
// Insert into the string.
str.insert(str.index("int"), "core ");
// Titlecase the string.
str.toTitle();
// Remove a character.
RWUChar16 space = static_cast<RWUChar16>(0x20);
str.remove(str.first(space), 1);
// Print the result.
cout << str << endl;
return 0;
}
Specifies the default character encoding scheme for conversions between narrow character strings and ...
Definition RWUConversionContext.h:101
Stores and manipulates Unicode character sequences encoded as UTF-16 code units.
Definition RWUString.h:187
unspecified_16bit_type RWUChar16
Definition uchar.h:66

Program Output:

SourcePro Core Internationalization Module
See also
RWBasicUString, RWUSubString, RWUConstSubString, RWUStringIterator, RWUConstStringIterator

Member Typedef Documentation

◆ code_point_iterator

A type that provides a bidirectional iterator over the code points in the string.

◆ const_code_point_iterator

A type that provides a const bidirectional iterator over the code points in the string.

◆ const_reverse_code_point_iterator

A type that provides a const bidirectional, reverse-order iterator over the code points in the string.

◆ reverse_code_point_iterator

A type that provides a bidirectional, reverse-order iterator over the code points in the string.

Member Enumeration Documentation

◆ NormalizationForm

A NormalizationForm value indicates a particular normalization form, as defined by the Unicode Standard Annex #15, "Unicode Normalization Forms," http://www.unicode.org/reports/tr15/. Same as RWUNormalizer::NormalizationForm.

In converting a string to any of these forms, RWUString::normalize() leaves US-ASCII characters unaffected, and replaces deprecated characters. RWUString::normalize() never introduces compatibility characters.

Enumerator
FormNFD 

Normalization Form Decomposed.

FormNFKD 

Normalization Form Compatibility Decomposed.

FormNFC 

Normalization Form Composed.

FormNFKC 

Normalization Form Compatibility Composed.

◆ StripType

An enumeration whose values are used to control the behavior of the strip() methods.

Enumerator
Leading 

Removes characters from the beginning of the string.

leading 

Removes characters from the beginning of the string.

Trailing 

Remove characters from the end of the string.

trailing 

Remove characters from the end of the string.

Both 

Remove characters from both ends of the string.

both 

Remove characters from both ends of the string.

◆ Utf8

This enumeration is used to select the constructors that accept UTF-8 encoded char strings.

Enumerator
UTF8 

 

Constructor & Destructor Documentation

◆ RWUString() [1/24]

RWUString::RWUString ( )
inline

Default constructor. Constructs an empty, null string.

◆ RWUString() [2/24]

RWUString::RWUString ( const RWUString & source)
inline

Copy constructor. Constructs an RWUString from source.

◆ RWUString() [3/24]

RWUString::RWUString ( const RWBasicUString & source)
inline

Conversion constructor. Constructs an RWUString from source.

◆ RWUString() [4/24]

RWUString::RWUString ( const RWUSubString & source)
inline

Constructs an RWUString containing a copy of the contents of the specified RWUSubString object source.

◆ RWUString() [5/24]

RWUString::RWUString ( const RWUConstSubString & source)
inline

Constructs an RWUString containing a copy of the contents of the specified RWUConstSubString object source.

◆ RWUString() [6/24]

RWUString::RWUString ( const RWUChar16 * source,
Duration duration = Transient )
inline

Constructs an RWUString instance that copies or references the contents of source, a null-terminated sequence of RWUChar16 values. The new RWUString instance assumes no responsibility for deallocating the storage associated with source.

If duration is Transient, this method copies the contents of source into an internally allocated and managed array.

If duration is Persistent, the client retains responsibility for the storage used for source. This mode may be used when source resides in static or otherwise durable storage. The storage associated with source must not be deallocated while the RWUString instance still references it. The original source array cannot be modified by any of the non-const methods provided by this class. RWUString creates a copy of source if any of these methods are called.

◆ RWUString() [7/24]

RWUString::RWUString ( const RWUChar16 * source,
size_t length,
Duration duration = Transient )
inline

Constructs an RWUString instance that copies or references the contents of source, an array of RWUChar16 values that contains length elements and may contain embedded nulls. The new RWUString instance assumes no responsibility for deallocating the storage associated with source.

If duration is Transient, this method copies the contents of source into an internally allocated and managed array.

If duration is Persistent, the client retains responsibility for the storage used for source. This mode may be used when source resides in static or otherwise durable storage. The storage associated with source must not be deallocated while the RWUString instance still references it. The original source array cannot be modified by any of the non-const methods provided by this class. RWUString creates a copy of source if any of these methods are called.

◆ RWUString() [8/24]

RWUString::RWUString ( const RWUChar16 * source,
size_t length,
size_t initialCapacity )
inline

Constructs an RWUString instance that copies the array source into an internally-managed buffer with a minimum capacity of initialCapacity.

If the original allocation does not possess the capacity required by an append, insert, or replace operation, a new buffer allocation will be made to accommodate the change in length.

◆ RWUString() [9/24]

RWUString::RWUString ( RWUChar16 * clientBuffer,
Deallocator * deallocator )
inline

Constructs an RWUString instance that assumes ownership of clientBuffer, a dynamically-allocated, null-terminated sequence of RWUChar16 values. The terminating null may appear at any position within the storage allocated for clientBuffer.

The deallocator parameter supplies the RWUString instance with an object that can be used to deallocate the storage referenced by clientBuffer.

The storage associated with clientBuffer must not be deallocated while the RWUString instance still references it.

If the original clientBuffer array does not possess the capacity required by an append, insert, or replace operation, the buffer will be copied into an internally allocated buffer. In this case, you won't be able to access clientBuffer via the original pointer. Capacity is determined by counting code units until the null character is found.

Copy-construction or assignment will produce an RWUString that refers to the same client-supplied buffer.

RWUString does not synchronize access to the client-supplied buffer; external synchronization will be required if multiple threads have access to the buffer through one or more RWUString instances.

◆ RWUString() [10/24]

RWUString::RWUString ( RWUChar16 * clientBuffer,
size_t contentLength,
Deallocator * deallocator )
inline

Constructs an RWUString instance that assumes ownership of clientBuffer, a dynamically-allocated array of RWUChar16 values that contains contentLength elements and may contain embedded nulls. The storage required to hold contentLength elements may be less than the storage that was allocated for clientBuffer.

The deallocator parameter supplies the RWUString instance with an object that can be used to deallocate the storage referenced by clientBuffer.

The storage associated with clientBuffer must not be deallocated while the RWUString instance still references it.

If the original clientBuffer array does not possess the capacity required by an append, insert, or replace operation, the buffer will be copied into an internally allocated buffer. In this case, you won't be able to access clientBuffer via the original pointer. Capacity is assumed to be equal to contentLength.

Copy-construction or assignment will produce an RWUString that refers to the same client-supplied buffer.

RWUString does not synchronize access to the client-supplied buffer; external synchronization will be required if multiple threads have access to the buffer through one or more RWUString instances.

◆ RWUString() [11/24]

RWUString::RWUString ( RWUChar16 * clientBuffer,
size_t contentLength,
size_t bufferCapacity,
Deallocator * deallocator )
inline

Constructs an RWUString instance that manipulates clientBuffer, a writable, client-supplied array that initially contains contentLength elements and whose total usable size is given by bufferCapacity.

The deallocator parameter supplies the RWUString instance with an object that can be used to deallocate the storage referenced by clientBuffer.

The storage associated with clientBuffer must not be deallocated while the RWUString instance still references it.

If the original clientBuffer array does not possess the capacity required by an append, insert, or replace operation, the buffer will be copied into an internally allocated buffer. In this case, you won't be able to access clientBuffer via the original pointer. Capacity is given by bufferCapacity.

Copy-construction or assignment will produce an RWUString that refers to the same client-supplied buffer.

RWUString does not synchronize access to the client-supplied buffer; external synchronization will be required if multiple threads have access to the buffer through one or more RWUString instances.

◆ RWUString() [12/24]

RWUString::RWUString ( const RWUChar32 * source)
inline

Constructs an RWUString from the code units produced by converting the UTF-32 encoded source into its equivalent UTF-16 representation. The string contained in source must be null-terminated.

◆ RWUString() [13/24]

RWUString::RWUString ( const RWUChar32 * source,
size_t length )
inline

Constructs an RWUString from the code units produced by converting the UCS-4 or UTF-32 encoded source into its equivalent UTF-16 representation. The number of elements in source is specified using length. The source array may contain embedded nulls.

◆ RWUString() [14/24]

RWUString::RWUString ( const RWSize_T & initialCapacity)
inline

Constructs RWUString containing a zero-length string and a capacity of initialCapacity. An RWSize_T instance must be constructed to eliminate potential ambiguity with the RWUString(RWUChar32,size_t) constructor:

RWUString array(RWSize_T(10));
Encapsulates the simple type, size_t.
Definition utility.h:33

◆ RWUString() [15/24]

RWUString::RWUString ( RWUChar16 codeUnit,
size_t repeat = 1 )
inline

Constructs an RWUString that contains repeat copies of the codeUnit.

◆ RWUString() [16/24]

RWUString::RWUString ( RWUChar32 codePoint,
size_t repeat = 1 )
inline

Constructs an RWUString that contains repeat copies of the code unit or surrogate pair of code units produced by converting the UTF-32 codePoint into its equivalent UTF-16 representation.

◆ RWUString() [17/24]

RWUString::RWUString ( const char * source,
Utf8  )
inline

Constructs an RWUString instance that contains the code units produced by converting the UTF-8 encoded text stored in source into a UTF-16 representation. The string contained in source must be null-terminated.

Use this method when a char text string is known to contain Unicode text encoded in UTF-8.

const char* utf8String = "..."; // UTF-8 encoded text
RWUString utf16String(utf8String, UTF8);
@ UTF8
Definition RWUString.h:283

◆ RWUString() [18/24]

RWUString::RWUString ( const char * source,
size_t length,
Utf8  )
inline

Constructs an RWUString instance that contains the code units produced by converting the UTF-8 encoded text stored in utf8Source into a UTF-16 representation. The length of string contained in source is specified using length. The source may contain embedded nulls.

Use this method when a char text string is known to contain Unicode text encoded in UTF-8.

const char* utf8String[20] = {...}; // UTF-8 encoded text
RWUString utf16String(utf8String, 20, UTF8);

◆ RWUString() [19/24]

RWUString::RWUString ( const RWCString & source,
Utf8  )
inline

Constructs an RWUString instance that contains the code units produced by converting the UTF-8 encoded text stored in source into a UTF-16 representation.

Use this method when an RWCString text string is known to contain Unicode text encoded in UTF-8:

RWCString utf8String("..."); // UTF-8 encoded text
RWUString utf16String(utf8String, UTF8);
Offers powerful and convenient facilities for manipulating strings.
Definition stdcstring.h:826

◆ RWUString() [20/24]

RWUString::RWUString ( const char * source,
RWUToUnicodeConverter & converter = RWUToUnicodeConversionContext::getContext().getConverter() )

Constructs an RWUString from the UTF-16 code unit sequence produced by converting the contents of the null-terminated character string source using the conversion specified by converter.

◆ RWUString() [21/24]

RWUString::RWUString ( const RWCString & source,
RWUToUnicodeConverter & converter = RWUToUnicodeConversionContext::getContext().getConverter() )

Constructs an RWUString from the UTF-16 code unit sequence produced by converting the contents of the null-terminated character string source using the conversion specified by converter.

◆ RWUString() [22/24]

RWUString::RWUString ( const RWCSubString & source,
RWUToUnicodeConverter & converter = RWUToUnicodeConversionContext::getContext().getConverter() )

Constructs an RWUString from the UTF-16 code unit sequence produced by converting the contents of the null-terminated character string source using the conversion specified by converter.

◆ RWUString() [23/24]

RWUString::RWUString ( const RWCConstSubString & source,
RWUToUnicodeConverter & converter = RWUToUnicodeConversionContext::getContext().getConverter() )

Constructs an RWUString from the UTF-16 code unit sequence produced by converting the contents of the null-terminated character string source using the conversion specified by converter.

◆ RWUString() [24/24]

RWUString::RWUString ( const std::string & source,
RWUToUnicodeConverter & converter = RWUToUnicodeConversionContext::getContext().getConverter() )

Constructs an RWUString from the UTF-16 code unit sequence produced by converting the contents of the null-terminated character string source using the conversion specified by converter.

Member Function Documentation

◆ append() [1/10]

RWUString & RWUString::append ( const RWBasicUString & source)
inline

Appends the contents of source to the contents of self, and returns a reference to self.

◆ append() [2/10]

RWUString & RWUString::append ( const RWBasicUString & source,
size_t sourceOffset,
size_t sourceLength )
inline

Appends the contents of the specified range in source to the contents of self, and returns a reference to self.

Exceptions
RWBoundsErrThrown if the sum of sourceOffset and sourceLength is greater than source.length().

◆ append() [3/10]

RWUString & RWUString::append ( const RWUChar16 * source)
inline

Appends the contents of the null-terminated array source to the contents of self, and returns a reference to self.

◆ append() [4/10]

RWUString & RWUString::append ( const RWUChar16 * source,
size_t sourceLength )
inline

Appends the contents of the array source to the contents of self, and returns a reference to self. The size of the source array is specified using sourceLength. The source array may contain embedded nulls.

◆ append() [5/10]

RWUString & RWUString::append ( const RWUChar32 * source)
inline

Converts the code points in the null-terminated array source into UTF-16 code units and appends those code units to the contents of self. Returns a reference to self.

◆ append() [6/10]

RWUString & RWUString::append ( const RWUChar32 * source,
size_t sourceLength )
inline

Converts the code points in the array source into UTF-16 code units and appends those code units to contents of self. Returns a reference to self. The source string may contain embedded nulls. The size of the source array is specified using sourceLength.

◆ append() [7/10]

RWUString & RWUString::append ( const RWUConstSubString & source)
inline

Appends the contents of source to the contents of self, and returns a reference to self.

◆ append() [8/10]

RWUString & RWUString::append ( const RWUSubString & source)
inline

Appends the contents of source to the contents of self, and returns a reference to self.

◆ append() [9/10]

RWUString & RWUString::append ( RWUChar16 codeUnit,
size_t repeat = 1 )
inline

Appends repeat copies of codeUnit to the contents of self. Returns a reference to self. The code unit is repeated repeat times. The code unit may be zero (null).

◆ append() [10/10]

RWUString & RWUString::append ( RWUChar32 codePoint,
size_t repeat = 1 )
inline

Converts the UTF-32 codePoint into its equivalent UTF-16 representation and appends repeat copies of the resultant code unit or surrogate pair of code units to the contents of self. Returns a reference to self. The code point may be zero (null).

◆ beginCodePointIterator() [1/2]

RWUString::code_point_iterator RWUString::beginCodePointIterator ( )
inline

Returns a code_point_iterator that refers to the position of the first code point in self.

◆ beginCodePointIterator() [2/2]

RWUString::const_code_point_iterator RWUString::beginCodePointIterator ( ) const
inline

Returns a const_iterator that refers to the position of the first code unit in self.

◆ cbeginCodePointIterator()

RWUString::const_code_point_iterator RWUString::cbeginCodePointIterator ( ) const
inline

Returns a const_code_point_iterator that refers to the position of the first code point in self.

◆ cendCodePointIterator()

RWUString::const_code_point_iterator RWUString::cendCodePointIterator ( ) const
inline

Returns a const_code_point_iterator that refers to the position after the last code point in self.

◆ compareCodePoints() [1/8]

int RWBasicUString::compareCodePoints ( const RWBasicUString & rhs) const
inline

Returns a value that describes the lexical ordering between self and rhs. The return value should be interpreted as follows:

  • Self appears before rhs if the return value is less than zero.
  • Self is identical to rhs if the return value is zero.
  • Self appears after rhs if the return value is greater than zero.

If the two strings have different lengths, the shorter string appears before the longer string if both strings are identical over the length of the shorter string.

◆ compareCodePoints() [2/8]

int RWBasicUString::compareCodePoints ( const RWBasicUString & rhs,
size_t rhsOffset,
size_t rhsLength ) const
inline

Returns a value that describes the lexical ordering between self and the specified range in rhs. The return value should be interpreted as follows:

  • Self appears before rhs range if the return value is less than zero.
  • Self is identical to rhs range if the return value is zero.
  • Self appears after rhs range if the return value is greater than zero.

If the two strings have different lengths, the shorter string appears before the longer string if both strings are identical over the length of the shorter string.

Exceptions
RWBoundsErrThrown if the sum of rhsOffset and rhsLength is greater than rhs.length().

◆ compareCodePoints() [3/8]

int RWBasicUString::compareCodePoints ( const RWUChar16 * rhs) const
inline

Returns a value that describes the lexical ordering between self and the null-terminated array rhs. The return value should be interpreted as follows:

  • Self appears before rhs if the return value is less than zero.
  • Self is identical to rhs if the return value is zero.
  • Self appears after rhs if the return value is greater than zero.

If the two strings have different lengths, the shorter string appears before the longer string if both strings are identical over the length of the shorter string.

◆ compareCodePoints() [4/8]

int RWBasicUString::compareCodePoints ( const RWUChar16 * rhs,
size_t rhsLength ) const
inline

Returns a value that describes the lexical ordering between self and the array rhs whose length is given by rhsLength. The return value should be interpreted as follows:

  • Self appears before rhs if the return value is less than zero.
  • Self is identical to rhs if the return value is zero.
  • Self appears after rhs if the return value is greater than zero.

If the two strings have different lengths, the shorter string appears before the longer string if both strings are identical over the length of the shorter string.

◆ compareCodePoints() [5/8]

int RWBasicUString::compareCodePoints ( const RWUChar32 * rhs) const
inline

Returns a value that describes the lexical ordering between self and the null-terminated array rhs. The return value should be interpreted as follows:

  • Self appears before rhs if the return value is less than zero.
  • Self is identical to rhs if the return value is zero.
  • Self appears after rhs if the return value is greater than zero.

If the two strings have different code unit lengths, the shorter string appears before the longer string if both strings are identical over the length of the shorter string.

◆ compareCodePoints() [6/8]

int RWBasicUString::compareCodePoints ( const RWUChar32 * rhs,
size_t rhsLength ) const
inline

Returns a value that describes the lexical ordering between self and the array rhs whose length is given by rhsLength. The return value should be interpreted as follows:

  • Self appears before rhs if the return value is less than zero.
  • Self is identical to rhs if the return value is zero.
  • Self appears after rhs if the return value is greater than zero.

If the two string have different code unit lengths, the shorter string appears before the longer string if both strings are identical over the length of the shorter string.

◆ compareCodePoints() [7/8]

int RWUString::compareCodePoints ( const RWUConstSubString & rhs) const
inline

Returns a value that describes the lexical ordering between self and rhs. The return value should be interpreted as follows:

  • Self appears before rhs if the return value is less than zero.
  • Self is identical to rhs if the return value is zero.
  • Self appears after rhs if the return value is greater than zero.

◆ compareCodePoints() [8/8]

int RWUString::compareCodePoints ( const RWUSubString & rhs) const
inline

Returns a value that describes the lexical ordering between self and rhs. The return value should be interpreted as follows:

  • Self appears before rhs if the return value is less than zero.
  • Self is identical to rhs if the return value is zero.
  • Self appears after rhs if the return value is greater than zero.

◆ compareCodeUnits() [1/6]

int RWBasicUString::compareCodeUnits ( const RWBasicUString & rhs) const
inline

Returns a value that describes the lexical ordering between self and rhs. The return value should be interpreted as follows:

  • Self appears before rhs if the return value is less than zero.
  • Self is identical to rhs if the return value is zero.
  • Self appears after rhs if the return value is greater than zero.

If the two strings have different lengths, the shorter string appears before the longer string if both strings are identical over the length of the shorter string.

This method compares code unit values, not code point values. This may not produce the desired result if either string contains surrogate pairs or code unit values above the surrogate region. Use compareCodePoints() if code point ordering is required.

◆ compareCodeUnits() [2/6]

int RWBasicUString::compareCodeUnits ( const RWBasicUString & rhs,
size_t rhsOffset,
size_t rhsLength ) const
inline

Returns a value that describes the lexical ordering between self and the specified range in rhs. The return value should be interpreted as follows:

  • Self appears before rhs range if the return value is less than zero.
  • Self is identical to rhs range if the return value is zero.
  • Self appears after rhs range if the return value is greater than zero.

If the two strings have different lengths, the shorter string appears before the longer string if both strings are identical over the length of the shorter string.

This method compares code unit values, not code point values. This may not produce the desired result if either string contains surrogate pairs or code unit values above the surrogate region. Use compareCodePoints() if code point ordering is required.

Exceptions
RWBoundsErrThrown if the sum of rhsOffset and rhsLength is greater than rhs.length().

◆ compareCodeUnits() [3/6]

int RWBasicUString::compareCodeUnits ( const RWUChar16 * rhs) const
inline

Returns a value that describes the lexical ordering between self and the null-terminated array rhs. The return value should be interpreted as follows:

  • Self appears before rhs if the return value is less than zero.
  • Self is identical to rhs if the return value is zero.
  • Self appears after rhs if the return value is greater than zero.

If the two strings have different lengths, the shorter string appears before the longer string if both strings are identical over the length of the shorter string.

This method compares code unit values, not code point values. This may not produce the desired result if either string contains surrogate pairs or code unit values above the surrogate region. Use compareCodePoints() if code point ordering is required.

◆ compareCodeUnits() [4/6]

int RWBasicUString::compareCodeUnits ( const RWUChar16 * rhs,
size_t rhsLength ) const
inline

Returns a value that describes the lexical ordering between self and the array rhs whose length is given by rhsLength. The return value should be interpreted as follows:

  • Self appears before rhs if the return value is less than zero.
  • Self is identical to rhs if the return value is zero.
  • Self appears after rhs if the return value is greater than zero.

If the two strings have different lengths, the shorter string appears before the longer string if both strings are identical over the length of the shorter string.

This method compares code unit values, not code point values. This may not produce the desired result if either string contains surrogate pairs or code unit values above the surrogate region. Use compareCodePoints() if code point ordering is required.

◆ compareCodeUnits() [5/6]

int RWUString::compareCodeUnits ( const RWUConstSubString & rhs) const
inline

Returns a value that describes the lexical ordering between self and rhs. The return value should be interpreted as follows:

  • Self appears before rhs if the return value is less than zero.
  • Self is identical to rhs if the return value is zero.
  • Self appears after rhs if the return value is greater than zero.

This method compares code unit values, not code point values. This may not produce the desired result if either string contains surrogate pairs or code unit values above the surrogate region. Use compareCodePoints() if code point ordering is required.

◆ compareCodeUnits() [6/6]

int RWUString::compareCodeUnits ( const RWUSubString & rhs) const
inline

Returns a value that describes the lexical ordering between self and rhs. The return value should be interpreted as follows:

  • Self appears before rhs if the return value is less than zero.
  • Self is identical to rhs if the return value is zero.
  • Self appears after rhs if the return value is greater than zero.

This method compares code unit values, not code point values. This may not produce the desired result if either string contains surrogate pairs or code unit values above the surrogate region. Use compareCodePoints() if code point ordering is required.

◆ compareTo() [1/8]

int RWBasicUString::compareTo ( const RWBasicUString & rhs) const
inline

Returns a value that describes the lexical ordering between self and rhs. Equivalent to compareCodeUnits(const RWBasicUString&) const.

◆ compareTo() [2/8]

int RWBasicUString::compareTo ( const RWBasicUString & rhs,
size_t rhsOffset,
size_t rhsLength ) const
inline

Returns a value that describes the lexical ordering between self and the specified range in rhs. Equivalent to compareCodeUnits(const RWBasicUString&,size_t,size_t) const.

◆ compareTo() [3/8]

int RWBasicUString::compareTo ( const RWUChar16 * rhs) const
inline

Returns a value that describes the lexical ordering between self and the null-terminated array rhs. Equivalent to compareCodeUnits(const RWUChar16*) const.

◆ compareTo() [4/8]

int RWBasicUString::compareTo ( const RWUChar16 * rhs,
size_t rhsLength ) const
inline

Returns a value that describes the lexical ordering between self and the array rhs whose length is give by rhsLength. Equivalent to compareCodeUnits(const RWUChar16*,size_t) const.

◆ compareTo() [5/8]

int RWBasicUString::compareTo ( const RWUChar32 * rhs) const
inline

Returns a value that describes the lexical ordering between self and the null-terminated array rhs. Equivalent to compareCodePoints(const RWUChar32*) const.

◆ compareTo() [6/8]

int RWBasicUString::compareTo ( const RWUChar32 * rhs,
size_t rhsLength ) const
inline

Returns a value that describes the lexical ordering between self and the array rhs whose length is give by rhsLength. Equivalent to compareCodePoints(const RWUChar32*,size_t) const.

◆ compareTo() [7/8]

int RWUString::compareTo ( const RWUConstSubString & rhs) const
inline

Returns a value that describes the lexical ordering between self and rhs. Equivalent to compareCodeUnits().

◆ compareTo() [8/8]

int RWUString::compareTo ( const RWUSubString & rhs) const
inline

Returns a value that describes the lexical ordering between self and rhs. Equivalent to compareCodeUnits().

◆ contains() [1/30]

bool RWBasicUString::contains ( const RWBasicUString & pattern) const
inline

Returns true if self contains pattern, otherwise returns false. A zero-length pattern returns true.

◆ contains() [2/30]

bool RWBasicUString::contains ( const RWBasicUString & pattern,
size_t patternOffset,
size_t patternLength ) const
inline

Returns true if self contains the specified range in pattern, otherwise returns false. The pattern range starts at index patternOffset and extends for patternLength code units. A zero-length pattern returns true.

Exceptions
RWBoundsErrThrown if the sum of patternOffset and patternLength is greater than pattern.length().

◆ contains() [3/30]

bool RWBasicUString::contains ( const RWUChar16 * pattern) const
inline

Returns true if self contains pattern, otherwise returns false. The pattern array must be null-terminated. A zero-length pattern returns true.

◆ contains() [4/30]

bool RWBasicUString::contains ( const RWUChar16 * pattern,
size_t patternLength ) const
inline

Returns true if self contains pattern, otherwise returns false. The size of the pattern array is specified using patternLength. A zero-length pattern returns true.

◆ contains() [5/30]

bool RWBasicUString::contains ( const RWUChar32 * pattern) const
inline

Returns true if self contains pattern, otherwise returns false. The pattern array must be null-terminated. A zero-length pattern returns true.

◆ contains() [6/30]

bool RWBasicUString::contains ( const RWUChar32 * pattern,
size_t patternLength ) const
inline

Returns true if self contains pattern, otherwise returns false. The size of the pattern array is specified using patternLength. A zero-length pattern returns true.

◆ contains() [7/30]

bool RWUString::contains ( const RWUConstSubString & pattern) const
inline

Returns true if self contains pattern; otherwise, false. A zero-length pattern returns true.

◆ contains() [8/30]

bool RWUString::contains ( const RWUSubString & pattern) const
inline

Returns true if self contains pattern; otherwise, false. A zero-length pattern returns true.

◆ contains() [9/30]

bool RWBasicUString::contains ( RWUChar16 codeUnit) const
inline

Returns true if self contains codeUnit, otherwise returns false.

◆ contains() [10/30]

bool RWBasicUString::contains ( RWUChar32 codePoint) const
inline

Returns true if self contains codePoint, otherwise returns false.

◆ contains() [11/30]

bool RWBasicUString::contains ( size_t offset,
const RWBasicUString & pattern ) const
inline

Returns true if the specified range in self contains pattern, otherwise returns false. The search begins at index offset within self. A zero-length pattern returns true.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ contains() [12/30]

bool RWBasicUString::contains ( size_t offset,
const RWBasicUString & pattern,
size_t patternOffset,
size_t patternLength ) const
inline

Returns true if the specified range in self contains the specified range in pattern, otherwise returns false. The search begins at index offset within self. The pattern range starts at index patternOffset and extends for patternLength code units. A zero-length pattern returns true.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length(), or the sum of patternOffset and patternLength is greater than pattern.length().

◆ contains() [13/30]

bool RWBasicUString::contains ( size_t offset,
const RWUChar16 * pattern ) const
inline

Returns true if the specified range in self contains pattern, otherwise returns false. The search begins at index offset within self. The pattern array must be null-terminated. A zero-length pattern returns true.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ contains() [14/30]

bool RWBasicUString::contains ( size_t offset,
const RWUChar16 * pattern,
size_t patternLength ) const
inline

Returns true if the specified range in self contains pattern, otherwise returns false. The search begins at index offset within self. The size of the pattern array is specified using patternLength. A zero-length pattern returns true.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ contains() [15/30]

bool RWBasicUString::contains ( size_t offset,
const RWUChar32 * pattern ) const
inline

Returns true if the specified range in self contains pattern, otherwise returns false. The search begins at index offset within self. The pattern array must be null-terminated. A zero-length pattern returns true.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ contains() [16/30]

bool RWBasicUString::contains ( size_t offset,
const RWUChar32 * pattern,
size_t patternLength ) const
inline

Returns true if the specified range in self contains pattern, otherwise returns false. The search begins at index offset within self. The size of the pattern array is specified using patternLength. A zero-length pattern returns true.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ contains() [17/30]

bool RWUString::contains ( size_t offset,
const RWUConstSubString & pattern ) const
inline

Returns true if the specified range in self contains pattern; otherwise, false. The search begins at index offset within self. A zero-length pattern returns true.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ contains() [18/30]

bool RWUString::contains ( size_t offset,
const RWUSubString & pattern ) const
inline

Returns true if the specified range in self contains pattern; otherwise, false. The search begins at index offset within self. A zero-length pattern returns true.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ contains() [19/30]

bool RWBasicUString::contains ( size_t offset,
RWUChar16 codeUnit ) const
inline

Returns true if the specified range in self contains codeUnit, otherwise returns false. The search begins at index offset within self.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ contains() [20/30]

bool RWBasicUString::contains ( size_t offset,
RWUChar32 codePoint ) const
inline

Returns true if the specified range in self contains codePoint, otherwise returns false. The search begins at index offset within self.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ contains() [21/30]

bool RWBasicUString::contains ( size_t offset,
size_t length,
const RWBasicUString & pattern ) const
inline

Returns true if the specified range in self contains pattern, otherwise returns false. The search range starts at index offset within self, and extends for length code units. A zero-length pattern returns true.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ contains() [22/30]

bool RWBasicUString::contains ( size_t offset,
size_t length,
const RWBasicUString & pattern,
size_t patternOffset,
size_t patternLength ) const
inline

Returns true if the specified range in self contains the specified range in pattern, otherwise returns false. The search range starts at index offset within self and extends for length code units. The pattern range starts at index patternOffset and extends for patternLength code units. A zero-length pattern returns true.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length(), or the sum of patternOffset and patternLength is greater than pattern.length().

◆ contains() [23/30]

bool RWBasicUString::contains ( size_t offset,
size_t length,
const RWUChar16 * pattern ) const
inline

Returns true if the specified range in self contains pattern, otherwise returns false. The search range starts at index offset within self and extends for length code units. The pattern array must be null-terminated. A zero-length pattern returns true.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ contains() [24/30]

bool RWBasicUString::contains ( size_t offset,
size_t length,
const RWUChar16 * pattern,
size_t patternLength ) const
inline

Returns true if the specified range in self contains pattern, otherwise returns false. The search range starts at index offset within self, and extends for length code units. The size of the pattern array is specified using patternLength. A zero-length pattern returns true.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ contains() [25/30]

bool RWBasicUString::contains ( size_t offset,
size_t length,
const RWUChar32 * pattern ) const
inline

Returns true if the specified range in self contains pattern, otherwise returns false. The search range starts at index offset within self, and extends for length code units. The pattern array must be null-terminated. A zero-length pattern returns true.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ contains() [26/30]

bool RWBasicUString::contains ( size_t offset,
size_t length,
const RWUChar32 * pattern,
size_t patternLength ) const
inline

Returns true if the specified range in self contains pattern, otherwise returns false. The search range starts at index offset within self and extends for length code units. The size of the pattern array is specified using patternLength. A zero-length pattern returns true.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ contains() [27/30]

bool RWUString::contains ( size_t offset,
size_t length,
const RWUConstSubString & pattern ) const
inline

Returns true if the specified range in self contains pattern; otherwise, false. The search begins at index offset within self, and extends for length code units. A zero-length pattern returns true.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ contains() [28/30]

bool RWUString::contains ( size_t offset,
size_t length,
const RWUSubString & pattern ) const
inline

Returns true if the specified range in self contains pattern; otherwise, false. The search begins at index offset within self, and extends for length code units. A zero-length pattern returns true.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ contains() [29/30]

bool RWBasicUString::contains ( size_t offset,
size_t length,
RWUChar16 codeUnit ) const
inline

Returns true if the specified range in self contains codeUnit, otherwise returns false. The search range starts at index offset within self and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ contains() [30/30]

bool RWBasicUString::contains ( size_t offset,
size_t length,
RWUChar32 codePoint ) const
inline

Returns true if the specified range in self contains codePoint, otherwise returns false. The search range starts at index offset within self, and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ crbeginCodePointIterator()

RWUString::const_reverse_code_point_iterator RWUString::crbeginCodePointIterator ( ) const
inline

Returns a const_reverse_code_point_iterator that refers to the position of the last code point in self.

◆ crendCodePointIterator()

RWUString::const_reverse_code_point_iterator RWUString::crendCodePointIterator ( ) const
inline

Returns a const_reverse_code_point_iterator that refers to the position prior to the first code point in self.

◆ endCodePointIterator() [1/2]

RWUString::code_point_iterator RWUString::endCodePointIterator ( )
inline

Returns a code_point_iterator that refers to the position after the last code point in self.

◆ endCodePointIterator() [2/2]

RWUString::const_code_point_iterator RWUString::endCodePointIterator ( ) const
inline

Returns a const_iterator that refers to the position after the last code unit in self.

◆ first() [1/27]

size_t RWBasicUString::first ( const RWBasicUString & codeUnitSet) const
inline

Returns the index of the first occurrence of any code unit in codeUnitSet, or RW_NPOS if none of the code units in the set are found.

◆ first() [2/27]

size_t RWBasicUString::first ( const RWUChar16 * codeUnitSet) const
inline

Returns the index of the first occurrence of any code unit in codeUnitSet, or RW_NPOS if none of the code units in the set are found. The codeUnitSet array must be null-terminated.

◆ first() [3/27]

size_t RWBasicUString::first ( const RWUChar16 * codeUnitSet,
size_t numCodeUnits ) const
inline

Returns the index of the first occurrence of any code unit in codeUnitSet, or RW_NPOS if none of the code units in the set are found. The size of the codeUnitSet array is specified using numCodeUnits.

◆ first() [4/27]

size_t RWBasicUString::first ( const RWUChar32 * codePointSet) const
inline

Returns the index of the first occurrence of any code point in codePointSet, or RW_NPOS if none of the code points in the set are found. The codePointSet array must be null-terminated.

◆ first() [5/27]

size_t RWBasicUString::first ( const RWUChar32 * codePointSet,
size_t numCodePoints ) const
inline

Returns the index of the first occurrence of any code point in codePointSet, or RW_NPOS if none of the code points in the set are found. The size of the codePointSet is specified using numCodePoints.

◆ first() [6/27]

size_t RWUString::first ( const RWUConstSubString & codeUnitSet) const
inline

Returns the index of the first occurrence of any code unit in codeUnitSet, or RW_NPOS if none of the code units in the set are found.

◆ first() [7/27]

size_t RWUString::first ( const RWUSubString & codeUnitSet) const
inline

Returns the index of the first occurrence of any code unit in codeUnitSet, or RW_NPOS if none of the code units in the set are found.

◆ first() [8/27]

size_t RWBasicUString::first ( RWUChar16 codeUnit) const
inline

Returns the index of the first occurrence of codeUnit, or RW_NPOS if that code unit is not found. This method produces the same result as index(RWUChar16) const.

◆ first() [9/27]

size_t RWBasicUString::first ( RWUChar32 codePoint) const
inline

Returns the index of the first occurrence of codePoint, or RW_NPOS if the code point is not found. This method produces the same result as index(RWUChar32) const.

◆ first() [10/27]

size_t RWBasicUString::first ( size_t offset,
const RWBasicUString & codeUnitSet ) const
inline

Returns the index of the first occurrence of any code unit in codeUnitSet, or RW_NPOS if none of the code units in the set are found. The search range starts at index offset within self.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ first() [11/27]

size_t RWBasicUString::first ( size_t offset,
const RWUChar16 * codeUnitSet ) const
inline

Returns the index of the first occurrence of any code unit in codeUnitSet within the specified range of self, or RW_NPOS is none of the code units in the set are found. The search range starts at index offset within self. The codeUnitSet array must be null-terminated.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ first() [12/27]

size_t RWBasicUString::first ( size_t offset,
const RWUChar16 * codeUnitSet,
size_t numCodeUnits ) const
inline

Returns the index of the first occurrence of any code unit in codeUnitSet, or RW_NPOS if none of the code units in the set are found. The search range starts at index offset within self. The size of the codeUnitSet array is specified using numCodeUnits.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ first() [13/27]

size_t RWBasicUString::first ( size_t offset,
const RWUChar32 * codePointSet ) const
inline

Returns the index of the first occurrence of any code point in codePointSet within the specified range in self, or RW_NPOS if none of the code points in the set are found. The search begins at index position offset within self. The codePointSet array must be null-terminated.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ first() [14/27]

size_t RWBasicUString::first ( size_t offset,
const RWUChar32 * codePointSet,
size_t numCodePoints ) const
inline

Returns the index of the first occurrence of any code point in codePointSet, or RW_NPOS if none of the code points in the set are found. The search begins at index position offset within self. The size of the codePointSet array is specified using numCodePoints.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ first() [15/27]

size_t RWUString::first ( size_t offset,
const RWUConstSubString & codeUnitSet ) const
inline

Returns the index of the first occurrence of any code unit in codeUnitSet, or RW_NPOS if none of the code units in the set are found. The search range starts at index offset within self, and extends through the length of self.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ first() [16/27]

size_t RWUString::first ( size_t offset,
const RWUSubString & codeUnitSet ) const
inline

Returns the index of the first occurrence of any code unit in codeUnitSet, or RW_NPOS if none of the code units in the set are found. The search range starts at index offset within self, and extends through the length of self.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ first() [17/27]

size_t RWBasicUString::first ( size_t offset,
RWUChar16 codeUnit ) const
inline

Returns the index of the first occurrence of codeUnit, or RW_NPOS if the code unit is not found. The search range starts at index offset within self.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ first() [18/27]

size_t RWBasicUString::first ( size_t offset,
RWUChar32 codePoint ) const
inline

Returns the index of the first occurrence of codePoint within the specified range in self, or RW_NPOS if the code point is not found. The search begins at index position offset within self.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ first() [19/27]

size_t RWBasicUString::first ( size_t offset,
size_t length,
const RWBasicUString & codeUnitSet ) const
inline

Returns the index of the first occurrence of any code unit in codeUnitSet within the specified range of self, or RW_NPOS if none of the code units in the set are found. The search range starts at index offset within self and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ first() [20/27]

size_t RWBasicUString::first ( size_t offset,
size_t length,
const RWUChar16 * codeUnitSet ) const
inline

Returns the index of the first occurrence of any code unit in codeUnitSet within the specified range of self, or RW_NPOS if none of the code units in the set are found. The search range starts at index offset within self and extends for length code units. The codeUnitSet array must be null-terminated.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ first() [21/27]

size_t RWBasicUString::first ( size_t offset,
size_t length,
const RWUChar16 * codeUnitSet,
size_t numCodeUnits ) const
inline

Returns the index of the first occurrence of any code unit in codeUnitSet within the specified range of self, or RW_NPOS if none of the code units in the set are found. The search range starts at index offset within self, and extends for length code units. The size of the codeUnitSet array is specified using numCodeUnits.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ first() [22/27]

size_t RWBasicUString::first ( size_t offset,
size_t length,
const RWUChar32 * codePointSet ) const
inline

Returns the index of the first occurrence of any code point in codePointSet within the specified range of self, or RW_NPOS if the none of the code points in the set are found. The search range starts at index offset within self and extends for length code units. The codePointSet array must be null-terminated.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ first() [23/27]

size_t RWBasicUString::first ( size_t offset,
size_t length,
const RWUChar32 * codePointSet,
size_t numCodePoints ) const
inline

Returns the index of the first occurrence of any code point in codePointSet within the specified range of self, or RW_NPOS if the none of the code points in the set are found. The search range starts at index offset within self and extends for length code units. The size of the codePointSet array is specified using numCodePoints.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ first() [24/27]

size_t RWUString::first ( size_t offset,
size_t length,
const RWUConstSubString & codeUnitSet ) const
inline

Returns the index of the first occurrence of any code unit in codeUnitSet, or RW_NPOS if none of the code units in the set are found. The search range starts at index offset within self, and extends for length code units within self.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ first() [25/27]

size_t RWUString::first ( size_t offset,
size_t length,
const RWUSubString & codeUnitSet ) const
inline

Returns the index of the first occurrence of any code unit in codeUnitSet, or RW_NPOS if none of the code units in the set are found. The search range starts at index offset within self, and extends for length code units within self.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ first() [26/27]

size_t RWBasicUString::first ( size_t offset,
size_t length,
RWUChar16 codeUnit ) const
inline

Returns the index of the first occurrence of codeUnit within the specified range of self, or RW_NPOS if the code unit is not found. The search range starts at index offset within self and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ first() [27/27]

size_t RWBasicUString::first ( size_t offset,
size_t length,
RWUChar32 codePoint ) const
inline

Returns the index of the first occurrence of codePoint within the specified range of self, or RW_NPOS if the code point is not found. The search range starts at index offset within self and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ foldCase() [1/2]

RWUString & RWUString::foldCase ( bool excludeSpecial = false)
inline

Changes all letters in self into a locale-independent, case-neutral representation suitable for use in case-less, lexical comparisons. Returns a reference to self.

Turkic (tr and az) scripts include I-dot and i-dotless variations of the Latin letter I. The mapping used for these characters is controlled by excludeSpecial. If excludeSpecial is false, all I forms are folded to the Latin small letter i.

If excludeSpecial is true, the special Turkic I-dot and i-dotless forms are not mapped and are left unchanged.

The length of the result may differ from that of the original. This function supports simple caseless comparisons; use RWUCollator when more robust behavior is required.

Note
  • This method produces a "full" case mapping where some characters are decomposed into multiple code points. This differs from the single code point mapping provided by RWUCharTraits, which provides only a simple one-to-one mapping.
  • Case folding does not preserve the normalization form of the source string; the result may require renormalization.
  • For more information on full versus simple case mapping, see UTR-21 Case Mappings, at http://www.unicode.org/reports/tr21/tr21-5.html

◆ foldCase() [2/2]

static RWUString RWUString::foldCase ( const RWUString & source,
bool excludeSpecial = false )
static

Returns a folded-case representation of source in which each character in source is converted into a locale-independent, case-neutral representation suitable for use in caseless, lexical comparisons. If excludeSpecial is true, the special mappings that map the dotted I and dotless i to capital I are excluded. The length of the result may be different than that of the original contents.

Note
This function supports simple caseless comparisons; use RWUCollator when more robust behavior is required.

◆ index() [1/30]

size_t RWBasicUString::index ( const RWBasicUString & pattern) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern is not found. Returns an index value of zero if the pattern length is zero.

◆ index() [2/30]

size_t RWBasicUString::index ( const RWBasicUString & pattern,
size_t patternOffset,
size_t patternLength ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern is not found. The pattern range starts at index patternOffset and extends for patternLength code units. Returns an index value of zero if the pattern length is zero.

Exceptions
RWBoundsErrThrown if the sum of patternOffset and patternLength is greater than pattern.length().

◆ index() [3/30]

size_t RWBasicUString::index ( const RWUChar16 * pattern) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern is not found. The pattern must be null-terminated. Returns an index value of zero if the pattern length is zero.

◆ index() [4/30]

size_t RWBasicUString::index ( const RWUChar16 * pattern,
size_t patternLength ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern is not found. The size of the pattern is specified using patternLength. Returns an index value of zero if the pattern length is zero.

◆ index() [5/30]

size_t RWBasicUString::index ( const RWUChar32 * pattern) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern is not found. The pattern must be null-terminated. Returns an index value of zero if the pattern length is zero.

◆ index() [6/30]

size_t RWBasicUString::index ( const RWUChar32 * pattern,
size_t patternLength ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern is not found. The size of the pattern is specified using patternLength. Returns an index value of zero if the pattern length is zero.

◆ index() [7/30]

size_t RWUString::index ( const RWUConstSubString & pattern) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern was not found. An index value of zero is returned if the pattern length is zero.

◆ index() [8/30]

size_t RWUString::index ( const RWUSubString & pattern) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern was not found. An index value of zero is returned if the pattern length is zero.

◆ index() [9/30]

size_t RWBasicUString::index ( RWUChar16 codeUnit) const
inline

Returns the index of the first occurrence of codeUnit, or RW_NPOS if the code unit is not found. This function produces the same result as first(RWUChar16) const.

◆ index() [10/30]

size_t RWBasicUString::index ( RWUChar32 codePoint) const
inline

Returns the index of the first occurrence of codePoint, or RW_NPOS if the code unit is not found. This function produces the same result as first(RWUChar32) const.

◆ index() [11/30]

size_t RWBasicUString::index ( size_t offset,
const RWBasicUString & pattern ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index position offset within self. Returns an index value of zero if the pattern length is zero.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ index() [12/30]

size_t RWBasicUString::index ( size_t offset,
const RWBasicUString & pattern,
size_t patternOffset,
size_t patternLength ) const
inline

Returns the index of the first occurrence of the specified range in pattern, or RW_NPOS if the pattern is not found. The search begins at index position offset within self. The pattern range starts at index patternOffset and extends for patternLength code units. Returns an index value of zero if the pattern length is zero.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length(), or if the sum of patternOffset and patternLength is greater than pattern.length().

◆ index() [13/30]

size_t RWBasicUString::index ( size_t offset,
const RWUChar16 * pattern ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index position offset within self. The pattern must be null-terminated. Returns an index value of zero if the pattern length is zero.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ index() [14/30]

size_t RWBasicUString::index ( size_t offset,
const RWUChar16 * pattern,
size_t patternLength ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index position offset within self. The size of the pattern is specified using patternLength. Returns an index value of zero if the pattern length is zero.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ index() [15/30]

size_t RWBasicUString::index ( size_t offset,
const RWUChar32 * pattern ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index position offset within self. The pattern must be null-terminated. Returns an index value of zero if the pattern length is zero.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ index() [16/30]

size_t RWBasicUString::index ( size_t offset,
const RWUChar32 * pattern,
size_t patternLength ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index position offset within self. The size of the pattern is specified using patternLength. Returns an index value of zero if the pattern length is zero.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ index() [17/30]

size_t RWUString::index ( size_t offset,
const RWUConstSubString & pattern ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern was not found. The search begins at index position offset within self, and extends through the length of self. An index value of zero is returned if the pattern length is zero.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ index() [18/30]

size_t RWUString::index ( size_t offset,
const RWUSubString & pattern ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern was not found. The search begins at index position offset within self, and extends through the length of self. An index value of zero is returned if the pattern length is zero.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ index() [19/30]

size_t RWBasicUString::index ( size_t offset,
RWUChar16 codeUnit ) const
inline

Returns the index of the first occurrence of codeUnit, or RW_NPOS if the code unit is not found. The search begins at index position offset within self. This function produces the same result as first(size_t,RWUChar16) const.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ index() [20/30]

size_t RWBasicUString::index ( size_t offset,
RWUChar32 codePoint ) const
inline

Returns the index of the first occurrence of codePoint, or RW_NPOS if the code unit is not found. The search begins at index position offset within self. This function produces the same result as first(size_t,RWUChar32) const.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ index() [21/30]

size_t RWBasicUString::index ( size_t offset,
size_t length,
const RWBasicUString & pattern ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index offset within self and extends for length code units. Returns an index value of zero if the pattern length is zero.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ index() [22/30]

size_t RWBasicUString::index ( size_t offset,
size_t length,
const RWBasicUString & pattern,
size_t patternOffset,
size_t patternLength ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index offset within self and extends for length code units. The pattern range starts at index patternOffset, and extends for patternLength code units. Returns an index value of zero if the pattern length is zero.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length() or if the sum of patternOffset and patternLength is greater than pattern.length().

◆ index() [23/30]

size_t RWBasicUString::index ( size_t offset,
size_t length,
const RWUChar16 * pattern ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index offset within self and extends for length code units. The pattern must be null-terminated. Returns an index value of zero if the pattern length is zero.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ index() [24/30]

size_t RWBasicUString::index ( size_t offset,
size_t length,
const RWUChar16 * pattern,
size_t patternLength ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index offset within self and extends for length code units. The size of the pattern is specified using patternLength. Returns an index value of zero if the pattern length is zero.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ index() [25/30]

size_t RWBasicUString::index ( size_t offset,
size_t length,
const RWUChar32 * pattern ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern is not found. The pattern must be null-terminated. The search begins at index offset within self and extends for length code units. Returns an index value of zero if the pattern length is zero.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ index() [26/30]

size_t RWBasicUString::index ( size_t offset,
size_t length,
const RWUChar32 * pattern,
size_t patternLength ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index offset within self and extends for length code units. The size of the pattern is specified using patternLength. Returns an index value of zero if the pattern length is zero.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ index() [27/30]

size_t RWUString::index ( size_t offset,
size_t length,
const RWUConstSubString & pattern ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern was not found. The search begins at index position offset within self, and extends for length code units. An index value of zero is returned if the pattern length is zero.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ index() [28/30]

size_t RWUString::index ( size_t offset,
size_t length,
const RWUSubString & pattern ) const
inline

Returns the index of the first occurrence of pattern, or RW_NPOS if the pattern was not found. The search begins at index position offset within self, and extends for length code units. An index value of zero is returned if the pattern length is zero.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ index() [29/30]

size_t RWBasicUString::index ( size_t offset,
size_t length,
RWUChar16 codeUnit ) const
inline

Returns the index of the first occurrence of codeUnit, or RW_NPOS if the code unit is not found. The search begins at index offset within self and extends for length code units. This function produces the same result as first(size_t,RWUChar16) const.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ index() [30/30]

size_t RWBasicUString::index ( size_t offset,
size_t length,
RWUChar32 codePoint ) const
inline

Returns the index of the first occurrence of codePoint, or RW_NPOS if the code unit is not found. The search begins at index offset within self and extends for length code units. This function produces the same result as first(size_t,RWUChar32) const.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ insert() [1/10]

RWUString & RWUString::insert ( size_t offset,
const RWBasicUString & source )
inline

Inserts the contents of source before the code unit at index offset within the contents of self.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ insert() [2/10]

RWUString & RWUString::insert ( size_t offset,
const RWBasicUString & source,
size_t sourceOffset,
size_t sourceLength )
inline

Inserts the contents of the specified range in source before the code unit at index offset within the contents of self. The range in source begins at sourceOffset, and extends for sourceLength code units.

Exceptions
RWBoundsErrThrown if offset is greater than length(), or if the sum of sourceOffset and sourceLength is greater than source.length().

◆ insert() [3/10]

RWUString & RWUString::insert ( size_t offset,
const RWUChar16 * source )
inline

Inserts the contents of the null-terminated array source before the code unit at index offset within the contents of self.

Exceptions
RWBoundsErrThrown if offset is greater than length().

◆ insert() [4/10]

RWUString & RWUString::insert ( size_t offset,
const RWUChar16 * source,
size_t sourceLength )
inline

Inserts the contents of the array source before the code unit at index offset within the contents of self. The size of the source array is specified using sourceLength. The source array may contain embedded nulls.

Exceptions
RWBoundsErrThrown if offset is greater than length().

◆ insert() [5/10]

RWUString & RWUString::insert ( size_t offset,
const RWUChar32 * source )
inline

Converts the code points in the null-terminated array source into UTF-16 code units and inserts those code units before the code unit at index offset within the contents of self.

Exceptions
RWBoundsErrThrown if offset is greater than length().

◆ insert() [6/10]

RWUString & RWUString::insert ( size_t offset,
const RWUChar32 * source,
size_t sourceLength )
inline

Converts the code points in the array source into UTF-16 code units and inserts those code units before the code unit at index offset within the contents of self. The size of the source array is specified using sourceLength. The source array may contain embedded nulls.

Exceptions
RWBoundsErrThrown if offset is greater than length().

◆ insert() [7/10]

RWUString & RWUString::insert ( size_t offset,
const RWUConstSubString & source )
inline

Inserts the contents of source before the code unit at index offset within the contents of self.

Exceptions
RWBoundsErrThrown if offset is greater than length().

◆ insert() [8/10]

RWUString & RWUString::insert ( size_t offset,
const RWUSubString & source )
inline

Inserts the contents of source before the code unit at index offset within the contents of self.

Exceptions
RWBoundsErrThrown if offset is greater than length().

◆ insert() [9/10]

RWUString & RWUString::insert ( size_t offset,
RWUChar16 codeUnit,
size_t repeat = 1 )
inline

Inserts repeat copies of codeUnit before the code unit at index offset within the contents of self. The code unit may be zero (null).

Exceptions
RWBoundsErrThrown if offset is greater than length().

◆ insert() [10/10]

RWUString & RWUString::insert ( size_t offset,
RWUChar32 codePoint,
size_t repeat = 1 )
inline

Converts the UTF-32 codePoint into its equivalent UTF-16 representation and inserts repeat copies of the resultant code unit or surrogate pair of code units before the code unit at index offset within the contents of self. The code point may be zero (null).

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ last() [1/27]

size_t RWBasicUString::last ( const RWBasicUString & codeUnitSet) const
inline

Returns the index of the last occurrence of any code unit in codeUnitSet, or RW_NPOS is none of the code units in the set are found.

◆ last() [2/27]

size_t RWBasicUString::last ( const RWUChar16 * codeUnitSet) const
inline

Returns the index of the last occurrence of any code unit in codeUnitSet, or RW_NPOS is none of the code units in the set are found. The codeUnitSet array must be null-terminated.

◆ last() [3/27]

size_t RWBasicUString::last ( const RWUChar16 * codeUnitSet,
size_t numCodeUnits ) const
inline

Returns the index of the last occurrence of any code unit in codeUnitSet, or RW_NPOS if none of the code units in the set are found. The size of the codeUnitSet array is specified using numCodeUnits.

◆ last() [4/27]

size_t RWBasicUString::last ( const RWUChar32 * codePointSet) const
inline

Returns the index of the last occurrence of any code point in codePointSet, or RW_NPOS if none of the code points in the set are found. The codePointSet array must be null-terminated.

◆ last() [5/27]

size_t RWBasicUString::last ( const RWUChar32 * codePointSet,
size_t numCodePoints ) const
inline

Returns the index of the last occurrence of any code point in codePointSet, or RW_NPOS if none of the code points in the set are found. The size of the codePointSet is specified using numCodePoints.

◆ last() [6/27]

size_t RWUString::last ( const RWUConstSubString & codeUnitSet) const
inline

Returns the index of the last occurrence of any code unit in codeUnitSet in self, or RW_NPOS is none of the code units in the set are found.

◆ last() [7/27]

size_t RWUString::last ( const RWUSubString & codeUnitSet) const
inline

Returns the index of the last occurrence of any code unit in codeUnitSet in self, or RW_NPOS is none of the code units in the set are found.

◆ last() [8/27]

size_t RWBasicUString::last ( RWUChar16 codeUnit) const
inline

Returns the index of the last occurrence of codeUnit, or RW_NPOS if that code unit is not found.

◆ last() [9/27]

size_t RWBasicUString::last ( RWUChar32 codePoint) const
inline

Returns the index of the last occurrence of codePoint, or RW_NPOS if that code point is not found.

◆ last() [10/27]

size_t RWBasicUString::last ( size_t offset,
const RWBasicUString & codeUnitSet ) const
inline

Returns the index of the last occurrence of any code unit in codeUnitSet within the specified range in self, or RW_NPOS is none of the code units in the set are found. The search begins at index position offset within self.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ last() [11/27]

size_t RWBasicUString::last ( size_t offset,
const RWUChar16 * codeUnitSet ) const
inline

Returns the index of the last occurrence of any code unit in codeUnitSet within the specified range in self, or RW_NPOS if none of the code units in the set are found. The search begins at index position offset within self. The codeUnitSet array must be null-terminated.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ last() [12/27]

size_t RWBasicUString::last ( size_t offset,
const RWUChar16 * codeUnitSet,
size_t numCodeUnits ) const
inline

Returns the index of the last occurrence of any code unit in codeUnitSet within the specified range in self, or RW_NPOS if none of the code units in the set are found. The search begins at index position offset within self. The size of the codeUnitSet array is specified using numCodeUnits.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ last() [13/27]

size_t RWBasicUString::last ( size_t offset,
const RWUChar32 * codePointSet ) const
inline

Returns the index of the last occurrence of any code point in codePointSet within the specified range of self, or RW_NPOS if none of the code points in the set are found. The search begins at index position offset within self. The codePointSet array must be null-terminated.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ last() [14/27]

size_t RWBasicUString::last ( size_t offset,
const RWUChar32 * codePointSet,
size_t numCodePoints ) const
inline

Returns the index of the last occurrence of any code point in codePointSet within the specified range in self, or RW_NPOS if none of the code points in the set are found. The search begins at index position offset within self. The size of the codePointSet is specified using numCodePoints.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ last() [15/27]

size_t RWUString::last ( size_t offset,
const RWUConstSubString & codeUnitSet ) const
inline

Returns the index of the last occurrence of any code unit in codeUnitSet from offset to the end of self, or returns RW_NPOS if none of the code units in the set were found. The search begins at the end of self and continues backward to location offset, at the front of the range.

Exceptions
RWBoundsErrThrown if offset is greater than length().

◆ last() [16/27]

size_t RWUString::last ( size_t offset,
const RWUSubString & codeUnitSet ) const
inline

Returns the index of the last occurrence of any code unit in codeUnitSet from offset to the end of self, or returns RW_NPOS if none of the code units in the set were found. The search begins at the end of self and continues backward to location offset, at the front of the range.

Exceptions
RWBoundsErrThrown if offset is greater than length().

◆ last() [17/27]

size_t RWBasicUString::last ( size_t offset,
RWUChar16 codeUnit ) const
inline

Returns the index of the last occurrence of codeUnit, within the specified range in self, or RW_NPOS if that code unit is not found. The search begins at index position offset within self.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ last() [18/27]

size_t RWBasicUString::last ( size_t offset,
RWUChar32 codePoint ) const
inline

Returns the index of the last occurrence of codePoint within the specified range in self, or RW_NPOS if that code point is not found. The search begins at index position offset within self.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ last() [19/27]

size_t RWBasicUString::last ( size_t offset,
size_t length,
const RWBasicUString & codeUnitSet ) const
inline

Returns the index of the last occurrence of any code unit in codeUnitSet within the specified range in self, or RW_NPOS if none of the code units in the set are found. The search range starts at index offset within self and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ last() [20/27]

size_t RWBasicUString::last ( size_t offset,
size_t length,
const RWUChar16 * codeUnitSet ) const
inline

Returns the index of the last occurrence of any code unit in codeUnitSet within the specified range in self, or RW_NPOS if none of the code units in the set are found. The search range starts at index offset within self and extends for length code units. The codeUnitSet array must be null-terminated.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ last() [21/27]

size_t RWBasicUString::last ( size_t offset,
size_t length,
const RWUChar16 * codeUnitSet,
size_t numCodeUnits ) const
inline

Returns the index of the last occurrence of any code unit in codeUnitSet within the specified range in self, or RW_NPOS if none of the code units in the set are found. The search range starts at index offset within self, and extends for length code units. The size of the codeUnitSet array is specified using numCodeUnits.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ last() [22/27]

size_t RWBasicUString::last ( size_t offset,
size_t length,
const RWUChar32 * codePointSet ) const
inline

Returns the index of the last occurrence of any code point in codePointSet within the specified range of self, or RW_NPOS if none of the code points in the set are found. The search range starts at index offset within self and extends for length code units. The codePointSet array must be null-terminated.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ last() [23/27]

size_t RWBasicUString::last ( size_t offset,
size_t length,
const RWUChar32 * codePointSet,
size_t numCodePoints ) const
inline

Returns the index of the last occurrence of any code point in codePointSet within the specified range in self, or RW_NPOS if none of the code points in the set are found. The search range starts at index offset within self, and extends for length code units. The size of the codePointSet is specified using numCodePoints.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ last() [24/27]

size_t RWUString::last ( size_t offset,
size_t length,
const RWUConstSubString & codeUnitSet ) const
inline

Returns the index of the last occurrence of any code unit in codeUnitSet within the specified range in self, or RW_NPOS if none of the code units in the set were found. The search begins at location offset + length within self and continues backward to location offset, at the front of the range.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ last() [25/27]

size_t RWUString::last ( size_t offset,
size_t length,
const RWUSubString & codeUnitSet ) const
inline

Returns the index of the last occurrence of any code unit in codeUnitSet within the specified range in self, or RW_NPOS if none of the code units in the set were found. The search begins at location offset + length within self and continues backward to location offset, at the front of the range.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ last() [26/27]

size_t RWBasicUString::last ( size_t offset,
size_t length,
RWUChar16 codeUnit ) const
inline

Returns the index of the last occurrence of codeUnit within the specified range in self, or RW_NPOS if that code unit is not found. The search range starts at index offset within self and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ last() [27/27]

size_t RWBasicUString::last ( size_t offset,
size_t length,
RWUChar32 codePoint ) const
inline

Returns the index of the last occurrence of codePoint within the specified range in self, or RW_NPOS if that code point is not found. The search range starts at index offset within self and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ normalize()

RWUString & RWUString::normalize ( NormalizationForm form = FormNFC)

Transforms the contents of self to the specified normalization form.

Many characters have a variety of forms, including diacritics or contextual variants. A "decorated" character (such as å or \xd9 , for example) may be represented in Unicode either by a single code point, or a sequence of code points consisting of the base character and one or more combining characters that modify it. It is possible that within a given string or text file, the same abstract character may be represented in a variety of ways. This variability must be handled if comparisons are to be meaningful.

Normalization is used to transform a string into a predictable sequence of code points. There are four basic normalization forms for strings, represented by the following enum values in RWUString::NormalizationForm:

  • formNFC (Normalization Form Composed)
  • formNFD (Normalization Form Decomposed)
  • formNFKD (Normalization Form Compatibility Decomposed)
  • formNFKC (Normalization Form Compatibility Composed)

This method transforms self into a specific normalization form. See RWUNormalizer for complete information about normalization and normalization forms, and see Section 5.3, "Normalization Forms," in the Internationalization Module User's Guide.

◆ operator()() [1/4]

RWUChar16 & RWUString::operator() ( size_t offset)
inline

Returns a reference to the code unit at the position specified by offset. This non-const variant can be used as an l-value in an assignment expression. Note that an individual code unit may not represent a complete code point.

Exceptions
RWBoundsErrThrown if the value of offset is greater than or equal to length()

◆ operator()() [2/4]

RWUChar16 RWUString::operator() ( size_t offset) const
inline

Returns the code unit value at the position specified by offset. Note that an individual code unit may not represent a complete code point.

Exceptions
RWBoundsErrThrown if the value of offset is greater than or equal to length()

◆ operator()() [3/4]

RWUSubString RWUString::operator() ( size_t offset,
size_t length )

Returns a substring within self that starts at offset and has an extent of length code units. The result can be used as an lvalue.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ operator()() [4/4]

RWUConstSubString RWUString::operator() ( size_t offset,
size_t length ) const

Returns a substring within self that starts at offset and has an extent of length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ operator+=() [1/7]

RWUString & RWUString::operator+= ( const RWBasicUString & source)
inline

Appends the contents of source to the contents of self.

◆ operator+=() [2/7]

RWUString & RWUString::operator+= ( const RWUChar16 * source)
inline

Appends the contents of the null-terminated array source to the contents of self.

◆ operator+=() [3/7]

RWUString & RWUString::operator+= ( const RWUChar32 * source)
inline

Appends the contents of the null-terminated array source to the contents of self, after converting the contents of source to UTF-16 using the current to-Unicode conversion context.

◆ operator+=() [4/7]

RWUString & RWUString::operator+= ( const RWUConstSubString & source)
inline

Appends the contents of source to the contents of self.

◆ operator+=() [5/7]

RWUString & RWUString::operator+= ( const RWUSubString & source)
inline

Appends the contents of source to the contents of self.

◆ operator+=() [6/7]

RWUString & RWUString::operator+= ( RWUChar16 codeUnit)
inline

Appends codeUnit to the contents of self.

◆ operator+=() [7/7]

RWUString & RWUString::operator+= ( RWUChar32 codePoint)
inline

Appends codePoint to the contents of self.

◆ operator=() [1/9]

RWUString & RWUString::operator= ( const char * source)
inline

Replaces the contents of self with a copy of the contents of source, and returns a reference to self. Converts the contents of source to UTF-16 using the current to-Unicode conversion context.

◆ operator=() [2/9]

RWUString & RWUString::operator= ( const RWBasicUString & source)
inline

Replaces the contents of self with a copy of the contents of source, and returns a reference to self.

◆ operator=() [3/9]

RWUString & RWUString::operator= ( const RWUChar16 * source)
inline

Replaces the contents of self with a copy of the null-terminated contents of source and returns a reference to self.

◆ operator=() [4/9]

RWUString & RWUString::operator= ( const RWUChar32 * source)
inline

Replaces the contents of self with the code unit sequence required to represent the null-terminated, UTF-32 encoded, contents of source in the UTF-16 encoding form and returns a reference to self.

◆ operator=() [5/9]

RWUString & RWUString::operator= ( const RWUConstSubString & source)
inline

Replaces the contents of self with a copy of the contents of source, and returns a reference to self.

◆ operator=() [6/9]

RWUString & RWUString::operator= ( const RWUString & source)
inline

Replaces the contents of self with a copy of the contents of source, and returns a reference to self.

◆ operator=() [7/9]

RWUString & RWUString::operator= ( const RWUSubString & source)
inline

Replaces the contents of self with a copy of the contents of source, and returns a reference to self.

◆ operator=() [8/9]

RWUString & RWUString::operator= ( RWUChar16 codeUnit)
inline

Replaces the contents of self with the single code unit codeUnit.

◆ operator=() [9/9]

RWUString & RWUString::operator= ( RWUChar32 codePoint)
inline

Replaces the contents of self with the code unit sequence required to represent codePoint in the UTF-16 encoding form and returns a reference to self.

◆ prepend() [1/10]

RWUString & RWUString::prepend ( const RWBasicUString & source)
inline

Prepends the contents of source to the contents of self. Returns a reference to self.

◆ prepend() [2/10]

RWUString & RWUString::prepend ( const RWBasicUString & source,
size_t sourceOffset,
size_t sourceLength )
inline

Prepends the contents of the specified range in source to the contents of self. Returns a reference to self. The range begins at index sourceOffset within source and extends for sourceLength code units.

Exceptions
RWBoundsErrThrown if the sum of sourceOffset and sourceLength is greater than source.length().

◆ prepend() [3/10]

RWUString & RWUString::prepend ( const RWUChar16 * source)
inline

Prepends the contents of the null-terminated array source to the contents of self. Returns a reference to self.

◆ prepend() [4/10]

RWUString & RWUString::prepend ( const RWUChar16 * source,
size_t sourceLength )
inline

Prepends the contents of the array source to the contents of self. Returns a reference to self. The size of the source array is specified using sourceLength. The source array may contain embedded nulls.

◆ prepend() [5/10]

RWUString & RWUString::prepend ( const RWUChar32 * source)
inline

Converts the code points in the null-terminated array source into UTF-16 code units and prepends those code units to contents of self. Returns a reference to self.

◆ prepend() [6/10]

RWUString & RWUString::prepend ( const RWUChar32 * source,
size_t sourceLength )
inline

Converts the code points in the array source into UTF-16 code units and prepends those code units to contents of self. Returns a reference to self. The size of the source array is specified using sourceLength. The source array may contain embedded nulls.

◆ prepend() [7/10]

RWUString & RWUString::prepend ( const RWUConstSubString & source)
inline

Prepends the contents of source to the contents of self. Returns a reference to self.

◆ prepend() [8/10]

RWUString & RWUString::prepend ( const RWUSubString & source)
inline

Prepends the contents of source to the contents of self. Returns a reference to self.

◆ prepend() [9/10]

RWUString & RWUString::prepend ( RWUChar16 codeUnit,
size_t repeat = 1 )
inline

Prepends repeat copies of codeUnit to the contents of self. Returns a reference to self. The code unit may be zero (null).

◆ prepend() [10/10]

RWUString & RWUString::prepend ( RWUChar32 codePoint,
size_t repeat = 1 )
inline

Converts the UTF-32 codePoint into its equivalent UTF-16 representation and prepends repeat copies of the resultant code unit or surrogate pair of code units to the contents of self. Returns a reference to self. The code point may be zero (null).

◆ rbeginCodePointIterator() [1/2]

RWUString::reverse_code_point_iterator RWUString::rbeginCodePointIterator ( )
inline

Returns a reverse_code_point_iterator that refers to the position of the last code point in self.

◆ rbeginCodePointIterator() [2/2]

RWUString::const_reverse_code_point_iterator RWUString::rbeginCodePointIterator ( ) const
inline

Returns a const_reverse_iterator that refers to the position before the first code unit in self.

◆ remove() [1/2]

RWUString & RWUString::remove ( size_t offset,
size_t length )
inline

Removes the specified range of code units from the contents of self, and collapses the contents as necessary to produce a contiguous result. Returns a reference to self. The range begins at index offset within self and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ remove() [2/2]

RWUString & RWUString::remove ( size_t offset = 0)
inline

Removes the range of code units that start at offset and extend through the end of self. Returns a reference to self.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ rendCodePointIterator() [1/2]

RWUString::reverse_code_point_iterator RWUString::rendCodePointIterator ( )
inline

Returns a reverse_code_point_iterator that refers to the position prior to the first code point in self.

◆ rendCodePointIterator() [2/2]

RWUString::const_reverse_code_point_iterator RWUString::rendCodePointIterator ( ) const
inline

Returns a const_reverse_iterator that refers to the position before the first code unit in self.

◆ replace() [1/10]

RWUString & RWUString::replace ( size_t offset,
size_t length,
const RWBasicUString & source )
inline

Replaces the specified range of code units in self with the contents of source. Returns a reference to self. The range begins at index offset within self and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ replace() [2/10]

RWUString & RWUString::replace ( size_t offset,
size_t length,
const RWBasicUString & source,
size_t sourceOffset,
size_t sourceLength )
inline

Replaces the specified range of code units in self with the specified range of code units in source. Returns a reference to self. The range in self begins at index offset and extends for length code units. The range in source begins at index sourceOffset and extends for sourceLength code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length(), or the sum of sourceOffset and sourceLength is greater than source.length().

◆ replace() [3/10]

RWUString & RWUString::replace ( size_t offset,
size_t length,
const RWUChar16 * source )
inline

Replaces the specified range of code units in self with the contents of the null-terminated array source. Returns a reference to self. The range begins at index offset within self and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ replace() [4/10]

RWUString & RWUString::replace ( size_t offset,
size_t length,
const RWUChar16 * source,
size_t sourceLength )
inline

Replaces the specified range of code units in self with the contents of the array source. Returns a reference to self. The range begins at index offset within self and extends for length code units. The size of the source array is specified using sourceLength. The source array may contain embedded nulls.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ replace() [5/10]

RWUString & RWUString::replace ( size_t offset,
size_t length,
const RWUChar32 * source )
inline

Converts the code points in the null-terminated array source into UTF-16 code units and replaces the specified range of code units in self with those code units. Returns a reference to self. The range begins at index offset within self and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ replace() [6/10]

RWUString & RWUString::replace ( size_t offset,
size_t length,
const RWUChar32 * source,
size_t sourceLength )
inline

Converts the code points in the array source into UTF-16 code units and replaces the specified range of code units in self with those code units. Returns a reference to self. The range begins at index offset within self and extends for length code units. The size of the source array is specified using sourceLength. The source array may contain embedded nulls.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ replace() [7/10]

RWUString & RWUString::replace ( size_t offset,
size_t length,
const RWUConstSubString & source )
inline

Replaces the specified range of code units in self with the contents of source. Returns a reference to self. The range begins at index offset within self and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ replace() [8/10]

RWUString & RWUString::replace ( size_t offset,
size_t length,
const RWUSubString & source )
inline

Replaces the specified range of code units in self with the contents of source. Returns a reference to self. The range begins at index offset within self and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ replace() [9/10]

RWUString & RWUString::replace ( size_t offset,
size_t length,
RWUChar16 codeUnit,
size_t repeat = 1 )
inline

Replaces the specified range of code units in self with repeat copies of codeUnit. Returns a reference to self. The range begins at index offset within self and extends for length code units. The code unit may be zero (null).

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ replace() [10/10]

RWUString & RWUString::replace ( size_t offset,
size_t length,
RWUChar32 codePoint,
size_t repeat = 1 )
inline

Converts the UTF-32 codePoint into its equivalent UTF-16 representation and replaces the specified range of code units in self with repeat copies of the resultant code unit or surrogate pair of code units. Returns a reference to self. The range begins at index offset within self and extends for length code units. The code point may be zero (null).

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ rindex() [1/30]

size_t RWBasicUString::rindex ( const RWBasicUString & pattern) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern is not found. Returns an index value equal to length() if the pattern length is zero.

◆ rindex() [2/30]

size_t RWBasicUString::rindex ( const RWBasicUString & pattern,
size_t patternOffset,
size_t patternLength ) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern is not found. The pattern range starts at index patternOffset and extends for patternLength code units. Returns an index value equal to length() if the pattern length is zero.

Exceptions
RWBoundsErrThrown if the sum of patternOffset and patternLength is greater than pattern.length().

◆ rindex() [3/30]

size_t RWBasicUString::rindex ( const RWUChar16 * pattern) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern is not found. The pattern must be null-terminated. Returns an index value equal to length() if the pattern length is zero.

◆ rindex() [4/30]

size_t RWBasicUString::rindex ( const RWUChar16 * pattern,
size_t patternLength ) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern is not found. The size of the pattern is specified using patternLength. Returns an index value equal to length() if the pattern length is zero.

◆ rindex() [5/30]

size_t RWBasicUString::rindex ( const RWUChar32 * pattern) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern is not found. The pattern must be null-terminated. Returns an index value equal to length() if the pattern length is zero.

◆ rindex() [6/30]

size_t RWBasicUString::rindex ( const RWUChar32 * pattern,
size_t patternLength ) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern is not found. The size of the pattern is specified using patternLength. Returns an index value equal to length() if the pattern length is zero.

◆ rindex() [7/30]

size_t RWUString::rindex ( const RWUConstSubString & pattern) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern was not found. An index value equal to length() is returned if the pattern length is zero.

◆ rindex() [8/30]

size_t RWUString::rindex ( const RWUSubString & pattern) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern was not found. An index value equal to length() is returned if the pattern length is zero.

◆ rindex() [9/30]

size_t RWBasicUString::rindex ( RWUChar16 codeUnit) const
inline

Returns the index of the last occurrence of codeUnit, or RW_NPOS if the code unit is not found. This method is equivalent to last(RWUChar16) const.

◆ rindex() [10/30]

size_t RWBasicUString::rindex ( RWUChar32 codePoint) const
inline

Returns the index of the last occurrence of codePoint, or RW_NPOS if the code unit was not found. This method is equivalent to last(RWUChar32) const.

◆ rindex() [11/30]

size_t RWBasicUString::rindex ( size_t offset,
const RWBasicUString & pattern ) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index offset within self and extends through the end of self. Returns an index value equal to length() if the pattern length is zero.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ rindex() [12/30]

size_t RWBasicUString::rindex ( size_t offset,
const RWBasicUString & pattern,
size_t patternOffset,
size_t patternLength ) const
inline

Returns the index of the last occurrence of the specified range in pattern, or RW_NPOS if the pattern is not found. The search begins at index offset within self and extends through the end of self.

The pattern begins at index patternOffset within the supplied pattern and extends for patternLength code units. Returns an index value equal to length() if the pattern length is zero.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length(), or the sum of patternOffset and patternLength is greater than length().

◆ rindex() [13/30]

size_t RWBasicUString::rindex ( size_t offset,
const RWUChar16 * pattern ) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index offset within self and extends through the end of self. The pattern must be null-terminated. Returns an index value equal to length() if the pattern length is zero.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ rindex() [14/30]

size_t RWBasicUString::rindex ( size_t offset,
const RWUChar16 * pattern,
size_t patternLength ) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index offset within self and extends through the end of self. The size of the pattern is specified using patternLength. Returns an index value equal to length() if the pattern length is zero.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ rindex() [15/30]

size_t RWBasicUString::rindex ( size_t offset,
const RWUChar32 * pattern ) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index offset within self and extends through the end of self. The pattern must be null-terminated. Returns an index value equal to length() if the pattern length is zero.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ rindex() [16/30]

size_t RWBasicUString::rindex ( size_t offset,
const RWUChar32 * pattern,
size_t patternLength ) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index offset within self and extends through the end of self. The size of the pattern is specified using patternLength. Returns an index value equal to length() if the pattern length is zero.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ rindex() [17/30]

size_t RWUString::rindex ( size_t offset,
const RWUConstSubString & pattern ) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern was not found. An index value equal to length() is returned if the pattern length is zero. The search begins at index offset within self and extends through the length of self.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ rindex() [18/30]

size_t RWUString::rindex ( size_t offset,
const RWUSubString & pattern ) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern was not found. An index value equal to length() is returned if the pattern length is zero. The search begins at index offset within self and extends through the length of self.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ rindex() [19/30]

size_t RWBasicUString::rindex ( size_t offset,
RWUChar16 codeUnit ) const
inline

Returns the index of the last occurrence of codeUnit, or RW_NPOS if the code unit is not found. The search begins at index offset within self and extends through the end of self. This function produces the same result as last(size_t,RWUChar16) const.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ rindex() [20/30]

size_t RWBasicUString::rindex ( size_t offset,
RWUChar32 codePoint ) const
inline

Returns the index of the last occurrence of codePoint, or RW_NPOS if the code unit is not found. The search begins at index offset within self and extends through the end of self. This function produces the same result as last(size_t,RWUChar32) const.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().

◆ rindex() [21/30]

size_t RWBasicUString::rindex ( size_t offset,
size_t length,
const RWBasicUString & pattern ) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index offset within self and extends for length code units. Returns an index value equal to the sum of offset and length if the pattern length is zero.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ rindex() [22/30]

size_t RWBasicUString::rindex ( size_t offset,
size_t length,
const RWBasicUString & pattern,
size_t patternOffset,
size_t patternLength ) const
inline

Returns the index of the last occurrence of the specified range in pattern, or RW_NPOS if the pattern is not found. The search begins at index offset within self and extends for length code units.

The pattern range begins at index patternOffset within pattern and extends for patternLength code units. Returns an index value equal to the sum of offset and length if the pattern length is zero.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length(), or the sum of patternOffset and patternLength is greater than pattern.length().

◆ rindex() [23/30]

size_t RWBasicUString::rindex ( size_t offset,
size_t length,
const RWUChar16 * pattern ) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index offset within self and extends for length code units. The pattern must be null-terminated. Returns an index value equal to the sum of offset and length if the pattern length is zero.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ rindex() [24/30]

size_t RWBasicUString::rindex ( size_t offset,
size_t length,
const RWUChar16 * pattern,
size_t patternLength ) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index offset within self and extends for length code units. The size of the pattern is specified using patternLength. Returns an index value equal to the sum of offset and length if the pattern length is zero.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ rindex() [25/30]

size_t RWBasicUString::rindex ( size_t offset,
size_t length,
const RWUChar32 * pattern ) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index offset within self and extends for length code units. The pattern must be null-terminated. Returns an index value equal to the sum of offset and length if the pattern length is zero.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ rindex() [26/30]

size_t RWBasicUString::rindex ( size_t offset,
size_t length,
const RWUChar32 * pattern,
size_t patternLength ) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern is not found. The search begins at index offset within self and extends for length code units. The size of the pattern is specified using patternLength. Returns an index value equal to the sum of offset and length if the pattern length is zero.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ rindex() [27/30]

size_t RWUString::rindex ( size_t offset,
size_t length,
const RWUConstSubString & pattern ) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern was not found. An index value equal to length() is returned if the pattern length is zero. The search begins at index offset within self and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than or equal to length().

◆ rindex() [28/30]

size_t RWUString::rindex ( size_t offset,
size_t length,
const RWUSubString & pattern ) const
inline

Returns the index of the last occurrence of pattern, or RW_NPOS if the pattern was not found. An index value equal to length() is returned if the pattern length is zero. The search begins at index offset within self and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than or equal to length().

◆ rindex() [29/30]

size_t RWBasicUString::rindex ( size_t offset,
size_t length,
RWUChar16 codeUnit ) const
inline

Returns the index of the last occurrence of codeUnit, or RW_NPOS if the code unit is not found. The search begins at index offset within self and extends for length code units. This method is equivalent to last(size_t,RWUChar16) const.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ rindex() [30/30]

size_t RWBasicUString::rindex ( size_t offset,
size_t length,
RWUChar32 codeUnit ) const
inline

Returns the index of the last occurrence of codeUnit, or RW_NPOS if the code unit is not found. The search begins at index offset within self and extends for length code units. This method is equivalent to last(size_t,RWUChar32) const.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().

◆ strip() [1/2]

RWUSubString RWUString::strip ( StripType stripType = Trailing,
RWUChar32 codePoint = static_cast< RWUChar32 >(0x0020) )

Returns a substring of self in which the character codePoint has been stripped off the beginning of the string, the end of the string, or both, as specified by stripType. The strip code point defaults to U+0020, the US-ASCII space character.

◆ strip() [2/2]

RWUConstSubString RWUString::strip ( StripType stripType = Trailing,
RWUChar32 codePoint = static_cast< RWUChar32 >(0x0020) ) const

Returns a substring of self in which the character codePoint has been stripped off the beginning of the string, the end of the string, or both, as specified by stripType. The strip code point defaults to U+0020, the US-ASCII space character.

◆ subString() [1/2]

RWUSubString RWUString::subString ( const RWUString & pattern,
size_t offset = 0 )

Returns a substring representing the first occurrence of the string pointed to by pattern following position offset. The result may be used as an lvalue. The result has a start position of RW_NPOS and a length of zero if no occurrences of the pattern could be found.

◆ subString() [2/2]

RWUConstSubString RWUString::subString ( const RWUString & pattern,
size_t offset = 0 ) const

Returns a substring representing the first occurrence of the string pointed to by pattern following position offset. The result has a start position of RW_NPOS and a length of zero if no occurrences of the pattern could be found.

◆ toBytes() [1/2]

static RWCString RWUString::toBytes ( const RWUChar16 * source,
size_t length,
RWUFromUnicodeConverter & converter = RWUFromUnicodeConversionContext::getContext().getConverter() )
static

Returns an RWCString instance that contains the sequence of bytes that are produced when the contents of the array source are converted into another character encoding scheme using converter.

See also
RWUFromUnicodeConversionContext and RWUFromUnicodeConverter.

◆ toBytes() [2/2]

RWCString RWUString::toBytes ( RWUFromUnicodeConverter & converter = RWUFromUnicodeConversionContext::getContext().getConverter()) const
inline

Returns an RWCString instance that contains the sequence of bytes that are produced when the contents of self are converted into another character encoding scheme using converter. See also RWUFromUnicodeConversionContext and RWUFromUnicodeConverter.

◆ toLower() [1/3]

RWUString & RWUString::toLower ( )

Changes all letters in self to lowercase using the case-mapping rules of the current default locale. The length of the result may be different than that of the original. Returns a reference to self.

◆ toLower() [2/3]

RWUString & RWUString::toLower ( const RWULocale & locale)
inline

Changes all letters in self to lowercase using the case-mapping rules of the specified locale. The length of the result may be different than that of the original. Returns a reference to self.

◆ toLower() [3/3]

static RWUString RWUString::toLower ( const RWUString & source,
const RWULocale & locale )
static

Returns a lowercase representation of source created using the case-mapping rules of the specified locale. The length of the result may be different than that of the original. Returns a reference to self.

◆ toTitle() [1/3]

RWUString & RWUString::toTitle ( )

Changes all words in self to titlecase using the case-mapping and word-break rules of the default locale. The length of the result may be different than that of the original. Returns a reference to self.

◆ toTitle() [2/3]

RWUString & RWUString::toTitle ( const RWULocale & locale)
inline

Changes all words in self to titlecase using the case-mapping and word-break rules of the specified locale. The length of the result may be different than that of the original. Returns a reference to self.

◆ toTitle() [3/3]

static RWUString RWUString::toTitle ( const RWUString & source,
const RWULocale & locale )
static

Returns a titlecase representation of source created using the case-mapping and word-break rules of the specified locale. The length of the result may be different than that of the original. Returns a reference to self.

◆ toUpper() [1/3]

RWUString & RWUString::toUpper ( )

Changes all letters in self to uppercase using the case-mapping rules of the default locale. The length of the result may be different than that of the original. Returns a reference to self.

◆ toUpper() [2/3]

RWUString & RWUString::toUpper ( const RWULocale & locale)
inline

Changes all letters in self to uppercase using the case-mapping rules of the specified locale. The length of the result may be different than that of the original. Returns a reference to self.

◆ toUpper() [3/3]

static RWUString RWUString::toUpper ( const RWUString & source,
const RWULocale & locale )
static

Returns an uppercase representation of source created using the case-mapping rules of the specified locale. The length of the result may be different than that of the original. Returns a reference to self.

◆ unescape() [1/2]

RWUString & RWUString::unescape ( )
inline

Parses the contents of self and replaces recognized escape sequences with the equivalent Unicode code unit representation. The following escape sequences are recognized:

  • \uhhhh = 4 hex digits in the range [0-9A-Fa-f]
  • \Uhhhhhhhh = 8 hex digits
  • \xhh = 1 or 2 hex digits
  • \ooo = 1, 2 or 3 octal digits in the range [0-7]
  • \a = U+0007; alert (BEL)
  • \b = U+0008; backspace (BS)
  • \t = U+0009; horizontal tab (HT)
  • \n = U+000A; newline/line feed (LF)
  • \v = U+000B; vertical tab (VT)
  • \f = U+000C; form feed (FF)
  • \r = U+000D; carriage return (CR)
  • \" = U+0022; double quote
  • \' = U+0027; single quote
  • \? = U+003F; question mark
  • \\ = U+005C; backslash

The value of any other escape sequence is the value of the character that follows the backslash. If an escape sequence is ill-formed, this method throws RWConversionErr with an ILLEGALSEQ message. A static version of this method is also provided.

◆ unescape() [2/2]

static RWUString RWUString::unescape ( const RWUString & source)
static

Parses the contents of source and replaces recognized escape sequences with the equivalent Unicode code unit representation. The following escape sequences are recognized:

  • \uhhhh = 4 hex digits in the range [0-9A-Fa-f]
  • \Uhhhhhhhh = 8 hex digits
  • \xhh = 1 or 2 hex digits
  • \ooo = 1, 2 or 3 octal digits in the range [0-7]
  • \a = U+0007; alert (BEL)
  • \b = U+0008; backspace (BS)
  • \t = U+0009; horizontal tab (HT)
  • \n = U+000A; newline/line feed (LF)
  • \v = U+000B; vertical tab (VT)
  • \f = U+000C; form feed (FF)
  • \r = U+000D; carriage return (CR)
  • \" = U+0022; double quote
  • \' = U+0027; single quote
  • \? = U+003F; question mark
  • \\ = U+005C; backslash

The value of any other escape sequence is the value of the character that follows the backslash.

If an escape sequence is ill-formed, this method will throw an RWConversionErr exception with an ILLEGALSEQ message. A non-static version of this method is also provided.

Friends And Related Symbol Documentation

◆ operator!=() [1/11]

bool operator!= ( const RWUChar16 * lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically not equal to rhs; otherwise, false.

◆ operator!=() [2/11]

bool operator!= ( const RWUChar32 * lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically not equal to rhs; otherwise, false.

◆ operator!=() [3/11]

bool operator!= ( const RWUConstSubString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically not equal to rhs; otherwise, false.

◆ operator!=() [4/11]

bool operator!= ( const RWUConstSubString & lhs,
const RWUSubString & rhs )
related

Returns true if lhs is lexicographically not equal to rhs; otherwise, false.

◆ operator!=() [5/11]

bool operator!= ( const RWUString & lhs,
const RWUChar16 * rhs )
related

Returns true if lhs is lexicographically not equal to rhs; otherwise, false.

◆ operator!=() [6/11]

bool operator!= ( const RWUString & lhs,
const RWUChar32 * rhs )
related

Returns true if lhs is lexicographically not equal to rhs; otherwise, false.

◆ operator!=() [7/11]

bool operator!= ( const RWUString & lhs,
const RWUConstSubString & rhs )
related

Returns true if lhs is lexicographically not equal to rhs; otherwise, false.

◆ operator!=() [8/11]

bool operator!= ( const RWUString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically not equal to rhs; otherwise, false.

◆ operator!=() [9/11]

bool operator!= ( const RWUString & lhs,
const RWUSubString & rhs )
related

Returns true if lhs is lexicographically not equal to rhs; otherwise, false.

◆ operator!=() [10/11]

bool operator!= ( const RWUSubString & lhs,
const RWUConstSubString & rhs )
related

Returns true if lhs is lexicographically not equal to rhs; otherwise, false.

◆ operator!=() [11/11]

bool operator!= ( const RWUSubString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically not equal to rhs; otherwise, false.

◆ operator+() [1/7]

RWUString operator+ ( const RWUChar16 * lhs,
const RWUString & rhs )
related

Concatenates lhs with rhs and returns the result.

◆ operator+() [2/7]

RWUString operator+ ( const RWUConstSubString & lhs,
const RWUString & rhs )
related

Concatenates lhs with rhs and returns the result.

◆ operator+() [3/7]

RWUString operator+ ( const RWUString & lhs,
const RWUChar16 * rhs )
related

Concatenates lhs with rhs and returns the result.

◆ operator+() [4/7]

RWUString operator+ ( const RWUString & lhs,
const RWUConstSubString & rhs )
related

Concatenates lhs with rhs and returns the result.

◆ operator+() [5/7]

RWUString operator+ ( const RWUString & lhs,
const RWUString & rhs )
related

Concatenates lhs with rhs and returns the result.

◆ operator+() [6/7]

RWUString operator+ ( const RWUString & lhs,
const RWUSubString & rhs )
related

Concatenates lhs with rhs and returns the result.

◆ operator+() [7/7]

RWUString operator+ ( const RWUSubString & lhs,
const RWUString & rhs )
related

Concatenates lhs with rhs and returns the result.

◆ operator<() [1/11]

bool operator< ( const RWUChar16 * lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically less than rhs; otherwise, false.

◆ operator<() [2/11]

bool operator< ( const RWUChar32 * lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically less than rhs; otherwise, false.

◆ operator<() [3/11]

bool operator< ( const RWUConstSubString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically less than rhs; otherwise, false.

◆ operator<() [4/11]

bool operator< ( const RWUConstSubString & lhs,
const RWUSubString & rhs )
related

Returns true if lhs is lexicographically less than rhs; otherwise, false.

◆ operator<() [5/11]

bool operator< ( const RWUString & lhs,
const RWUChar16 * rhs )
related

Returns true if lhs is lexicographically less than rhs; otherwise, false.

◆ operator<() [6/11]

bool operator< ( const RWUString & lhs,
const RWUChar32 * rhs )
related

Returns true if lhs is lexicographically less than rhs; otherwise, false.

◆ operator<() [7/11]

bool operator< ( const RWUString & lhs,
const RWUConstSubString & rhs )
related

Returns true if lhs is lexicographically less than rhs; otherwise, false.

◆ operator<() [8/11]

bool operator< ( const RWUString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically less than rhs; otherwise, false.

◆ operator<() [9/11]

bool operator< ( const RWUString & lhs,
const RWUSubString & rhs )
related

Returns true if lhs is lexicographically less than rhs; otherwise, false.

◆ operator<() [10/11]

bool operator< ( const RWUSubString & lhs,
const RWUConstSubString & rhs )
related

Returns true if lhs is lexicographically less than rhs; otherwise, false.

◆ operator<() [11/11]

bool operator< ( const RWUSubString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically less than rhs; otherwise, false.

◆ operator<<() [1/2]

std::ostream & operator<< ( std::ostream & os,
const RWUString & ustr )
related

Writes the sequence of bytes that are produced when contents of ustr are converted into the character encoding scheme specified by the currently active target RWUFromUnicodeConversionContext.

If os.width() is greater than the number of code points contained in the source string, the output is padded using a single space fill character (U+0020). If os.width() is less than the number of code points contained the source string, the entire contents of the string are inserted into the output stream. Any padding is inserted after the string if the std::ios_base::left format flag is set, or before if std::ios_base::right is set or if neither flag is set.

Exceptions
RWUExceptionThrown to report conversion errors.
std::ios_base::failureThrown to report any errors detected while performing stream operations.

◆ operator<<() [2/2]

std::ostream & operator<< ( std::ostream & os,
const RWUString::Pad & pad )
related

Writes the sequence of bytes that are produced when the contents of the RWUString used to construct pad are converted into the character encoding scheme specified by the currently active target RWUFromUnicodeConversionContext.

If os.width() is greater than the number of code points contained in the source string, the output is padded using a single space fill character (U+0020). If os.width() is less than the number of code points contained the source string, the entire contents of the string are inserted into the output stream. Any padding is inserted after the string if the std::ios_base::left format flag is set, or before if std::ios_base::right is set or if neither flag is set.

Exceptions
RWUExceptionThrown to report conversion errors.
std::ios_base::failureThrown to report any errors detected while performing stream operations.

◆ operator<=() [1/11]

bool operator<= ( const RWUChar16 * lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically less than or equal to rhs; otherwise, false.

◆ operator<=() [2/11]

bool operator<= ( const RWUChar32 * lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically less than or equal to rhs; otherwise, false.

◆ operator<=() [3/11]

bool operator<= ( const RWUConstSubString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically less than or equal to rhs; otherwise, false.

◆ operator<=() [4/11]

bool operator<= ( const RWUConstSubString & lhs,
const RWUSubString & rhs )
related

Returns true if lhs is lexicographically less than or equal to rhs; otherwise, false.

◆ operator<=() [5/11]

bool operator<= ( const RWUString & lhs,
const RWUChar16 * rhs )
related

Returns true if lhs is lexicographically less than or equal to rhs; otherwise, false.

◆ operator<=() [6/11]

bool operator<= ( const RWUString & lhs,
const RWUChar32 * rhs )
related

Returns true if lhs is lexicographically less than or equal to rhs; otherwise, false.

◆ operator<=() [7/11]

bool operator<= ( const RWUString & lhs,
const RWUConstSubString & rhs )
related

Returns true if lhs is lexicographically less than or equal to rhs; otherwise, false.

◆ operator<=() [8/11]

bool operator<= ( const RWUString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically less than or equal to rhs; otherwise, false.

◆ operator<=() [9/11]

bool operator<= ( const RWUString & lhs,
const RWUSubString & rhs )
related

Returns true if lhs is lexicographically less than or equal to rhs; otherwise, false.

◆ operator<=() [10/11]

bool operator<= ( const RWUSubString & lhs,
const RWUConstSubString & rhs )
related

Returns true if lhs is lexicographically less than or equal to rhs; otherwise, false.

◆ operator<=() [11/11]

bool operator<= ( const RWUSubString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically less than or equal to rhs; otherwise, false.

◆ operator==() [1/11]

bool operator== ( const RWUChar16 * lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically equal to rhs; otherwise, false.

◆ operator==() [2/11]

bool operator== ( const RWUChar32 * lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically equal to rhs; otherwise, false.

◆ operator==() [3/11]

bool operator== ( const RWUConstSubString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically equal to rhs; otherwise, false.

◆ operator==() [4/11]

bool operator== ( const RWUConstSubString & lhs,
const RWUSubString & rhs )
related

Returns true if lhs is lexicographically equal to rhs; otherwise, false.

◆ operator==() [5/11]

bool operator== ( const RWUString & lhs,
const RWUChar16 * rhs )
related

Returns true if lhs is lexicographically equal to rhs; otherwise, false.

◆ operator==() [6/11]

bool operator== ( const RWUString & lhs,
const RWUChar32 * rhs )
related

Returns true if lhs is lexicographically equal to rhs; otherwise, false.

◆ operator==() [7/11]

bool operator== ( const RWUString & lhs,
const RWUConstSubString & rhs )
related

Returns true if lhs is lexicographically equal to rhs; otherwise, false.

◆ operator==() [8/11]

bool operator== ( const RWUString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically equal to rhs; otherwise, false.

◆ operator==() [9/11]

bool operator== ( const RWUString & lhs,
const RWUSubString & rhs )
related

Returns true if lhs is lexicographically equal to rhs; otherwise, false.

◆ operator==() [10/11]

bool operator== ( const RWUSubString & lhs,
const RWUConstSubString & rhs )
related

Returns true if lhs is lexicographically equal to rhs; otherwise, false.

◆ operator==() [11/11]

bool operator== ( const RWUSubString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically equal to rhs; otherwise, false.

◆ operator>() [1/11]

bool operator> ( const RWUChar16 * lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically greater than rhs; otherwise, false.

◆ operator>() [2/11]

bool operator> ( const RWUChar32 * lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically greater than rhs; otherwise, false.

◆ operator>() [3/11]

bool operator> ( const RWUConstSubString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically greater than rhs; otherwise, false.

◆ operator>() [4/11]

bool operator> ( const RWUConstSubString & lhs,
const RWUSubString & rhs )
related

Returns true if lhs is lexicographically greater than rhs; otherwise, false.

◆ operator>() [5/11]

bool operator> ( const RWUString & lhs,
const RWUChar16 * rhs )
related

Returns true if lhs is lexicographically greater than rhs; otherwise, false.

◆ operator>() [6/11]

bool operator> ( const RWUString & lhs,
const RWUChar32 * rhs )
related

Returns true if lhs is lexicographically greater than rhs; otherwise, false.

◆ operator>() [7/11]

bool operator> ( const RWUString & lhs,
const RWUConstSubString & rhs )
related

Returns true if lhs is lexicographically greater than rhs; otherwise, false.

◆ operator>() [8/11]

bool operator> ( const RWUString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically greater than rhs; otherwise, false.

◆ operator>() [9/11]

bool operator> ( const RWUString & lhs,
const RWUSubString & rhs )
related

Returns true if lhs is lexicographically greater than rhs; otherwise, false.

◆ operator>() [10/11]

bool operator> ( const RWUSubString & lhs,
const RWUConstSubString & rhs )
related

Returns true if lhs is lexicographically greater than rhs; otherwise, false.

◆ operator>() [11/11]

bool operator> ( const RWUSubString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically greater than rhs; otherwise, false.

◆ operator>=() [1/11]

bool operator>= ( const RWUChar16 * lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

◆ operator>=() [2/11]

bool operator>= ( const RWUChar32 * lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

◆ operator>=() [3/11]

bool operator>= ( const RWUConstSubString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

◆ operator>=() [4/11]

bool operator>= ( const RWUConstSubString & lhs,
const RWUSubString & rhs )
related

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

◆ operator>=() [5/11]

bool operator>= ( const RWUString & lhs,
const RWUChar16 * rhs )
related

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

◆ operator>=() [6/11]

bool operator>= ( const RWUString & lhs,
const RWUChar32 * rhs )
related

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

◆ operator>=() [7/11]

bool operator>= ( const RWUString & lhs,
const RWUConstSubString & rhs )
related

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

◆ operator>=() [8/11]

bool operator>= ( const RWUString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

◆ operator>=() [9/11]

bool operator>= ( const RWUString & lhs,
const RWUSubString & rhs )
related

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

◆ operator>=() [10/11]

bool operator>= ( const RWUSubString & lhs,
const RWUConstSubString & rhs )
related

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

◆ operator>=() [11/11]

bool operator>= ( const RWUSubString & lhs,
const RWUString & rhs )
related

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

◆ operator>>()

std::istream & operator>> ( std::istream & is,
RWUString & ustr )
related

Reads an encoded byte stream from istream. The byte sequence is converted into UTF-16 using the currently active RWUToUnicodeConversionContext. Leading whitespace is always skipped before storing any code points, regardless of the std::ios::skipws format flag setting. Code points are then extracted until:

  • os.width() code points are read, if os.width() is greater than zero
  • a whitespace code point is read
  • the end of the input sequence is reached

The following Unicode characters are treated as whitespace delimiters:

  • U+0009 HORIZONTAL TABULATION
  • U+000A LINE FEED
  • U+000B VERTICAL TABULATION
  • U+000C FORM FEED
  • U+000D CARRIAGE RETURN
  • U+001C FILE SEPARATOR
  • U+001D GROUP SEPARATOR
  • U+001E RECORD SEPARATOR
  • U+001F UNIT SEPARATOR
  • U+0020 SPACE
  • U+0085 NEXT LINE
  • U+1680 OGHAM SPACE MARK
  • U+2000 EN QUAD
  • U+2001 EM QUAD
  • U+2002 EN SPACE
  • U+2003 EM SPACE
  • U+2004 THREE-PER-EM SPACE
  • U+2005 FOUR-PER-EM SPACE
  • U+2006 SIX-PER-EM SPACE
  • U+2007 FIGURE SPACE
  • U+2008 PUNCTUATION SPACE
  • U+2009 THIN SPACE
  • U+200A HAIR SPACE
  • U+200B ZERO WIDTH SPACE
  • U+2028 LINE SEPARATOR
  • U+2029 PARAGRAPH SEPARATOR
  • U+3000 IDEOGRAPHIC SPACE

Unlike standard extractors, this extractor must consume and discard the trailing whitespace delimiter. This behavior is due to the nature of the UTF-8 encoding scheme, which requires multiple bytes to encode some whitespace characters. For the same reason, this extractor cannot support the noskipws condition where the std::ios_base::skipws format flag has been cleared; each extraction will consume one whitespace character. Nor is a whitespace manipulator is not provide, since such a manipulator would consume the first non-whitespace character following a sequence of whitespace characters.

Exceptions
RWUExceptionThrown to report conversion errors.
std::ios_base::failureThrown to report any errors detected while performing stream operations.

Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.