SourcePro® API Reference Guide

 
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Related Functions

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 RWUString &source)
 
 RWUString (const RWBasicUString &source)
 
 RWUString (const RWUSubString &source)
 
 RWUString (const RWUConstSubString &source)
 
 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 (RWUChar16 *clientBuffer, Deallocator *deallocator)
 
 RWUString (RWUChar16 *clientBuffer, size_t contentLength, Deallocator *deallocator)
 
 RWUString (RWUChar16 *clientBuffer, size_t contentLength, size_t bufferCapacity, Deallocator *deallocator)
 
 RWUString (const RWUChar32 *source)
 
 RWUString (const RWUChar32 *source, size_t length)
 
 RWUString (const RWSize_T &initialCapacity)
 
 RWUString (RWUChar16 codeUnit, size_t repeat=1)
 
 RWUString (RWUChar32 codePoint, size_t repeat=1)
 
 RWUString (const char *source, Utf8)
 
 RWUString (const char *source, size_t length, Utf8)
 
 RWUString (const RWCString &source, Utf8)
 
 RWUString (const char *source, RWUToUnicodeConverter &converter=RWUToUnicodeConversionContext::getContext().getConverter())
 
 RWUString (const RWCString &source, RWUToUnicodeConverter &converter=RWUToUnicodeConversionContext::getContext().getConverter())
 
 RWUString (const RWCSubString &source, RWUToUnicodeConverter &converter=RWUToUnicodeConversionContext::getContext().getConverter())
 
 RWUString (const RWCConstSubString &source, RWUToUnicodeConverter &converter=RWUToUnicodeConversionContext::getContext().getConverter())
 
 RWUString (const std::string &source, RWUToUnicodeConverter &converter=RWUToUnicodeConversionContext::getContext().getConverter())
 
RWUStringappend (const RWBasicUString &source)
 
RWUStringappend (const RWBasicUString &source, size_t sourceOffset, size_t sourceLength)
 
RWUStringappend (const RWUSubString &source)
 
RWUStringappend (const RWUConstSubString &source)
 
RWUStringappend (const RWUChar16 *source)
 
RWUStringappend (const RWUChar16 *source, size_t sourceLength)
 
RWUStringappend (const RWUChar32 *source)
 
RWUStringappend (const RWUChar32 *source, size_t sourceLength)
 
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 RWUSubString &rhs) const
 
int compareCodePoints (const RWUConstSubString &rhs) const
 
int compareCodeUnits (const RWUSubString &rhs) const
 
int compareCodeUnits (const RWUConstSubString &rhs) const
 
int compareTo (const RWUSubString &rhs) const
 
int compareTo (const RWUConstSubString &rhs) const
 
bool contains (const RWUSubString &pattern) const
 
bool contains (const RWUConstSubString &pattern) const
 
bool contains (size_t offset, const RWUSubString &pattern) const
 
bool contains (size_t offset, const RWUConstSubString &pattern) const
 
bool contains (size_t offset, size_t length, const RWUSubString &pattern) const
 
bool contains (size_t offset, size_t length, const RWUConstSubString &pattern) 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 RWUSubString &codeUnitSet) const
 
size_t first (const RWUConstSubString &codeUnitSet) const
 
size_t first (size_t offset, const RWUSubString &codeUnitSet) const
 
size_t first (size_t offset, 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, const RWUConstSubString &codeUnitSet) const
 
RWUStringfoldCase (bool excludeSpecial=false)
 
size_t index (const RWUSubString &pattern) const
 
size_t index (const RWUConstSubString &pattern) const
 
size_t index (size_t offset, const RWUSubString &pattern) const
 
size_t index (size_t offset, 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, const RWUConstSubString &pattern) 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 RWUSubString &source)
 
RWUStringinsert (size_t offset, const RWUConstSubString &source)
 
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, RWUChar16 codeUnit, size_t repeat=1)
 
RWUStringinsert (size_t offset, RWUChar32 codePoint, size_t repeat=1)
 
size_t last (const RWUSubString &codeUnitSet) const
 
size_t last (const RWUConstSubString &codeUnitSet) const
 
size_t last (size_t offset, const RWUSubString &codeUnitSet) const
 
size_t last (size_t offset, 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, const RWUConstSubString &codeUnitSet) 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 RWUSubString &source)
 
RWUStringoperator+= (const RWUConstSubString &source)
 
RWUStringoperator+= (const RWUChar16 *source)
 
RWUStringoperator+= (const RWUChar32 *source)
 
RWUStringoperator+= (RWUChar16 codeUnit)
 
RWUStringoperator+= (RWUChar32 codePoint)
 
RWUStringoperator= (const RWUString &source)
 
RWUStringoperator= (const RWBasicUString &source)
 
RWUStringoperator= (const char *source)
 
RWUStringoperator= (const RWUSubString &source)
 
RWUStringoperator= (const RWUConstSubString &source)
 
RWUStringoperator= (const RWUChar16 *source)
 
RWUStringoperator= (const RWUChar32 *source)
 
RWUStringoperator= (RWUChar16 codeUnit)
 
RWUStringoperator= (RWUChar32 codePoint)
 
RWUStringprepend (const RWBasicUString &source)
 
RWUStringprepend (const RWBasicUString &source, size_t sourceOffset, size_t sourceLength)
 
RWUStringprepend (const RWUSubString &source)
 
RWUStringprepend (const RWUConstSubString &source)
 
RWUStringprepend (const RWUChar16 *source)
 
RWUStringprepend (const RWUChar16 *source, size_t sourceLength)
 
RWUStringprepend (const RWUChar32 *source)
 
RWUStringprepend (const RWUChar32 *source, size_t sourceLength)
 
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=0)
 
RWUStringremove (size_t offset, size_t length)
 
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 RWUSubString &source)
 
RWUStringreplace (size_t offset, size_t length, const RWUConstSubString &source)
 
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, RWUChar16 codeUnit, size_t repeat=1)
 
RWUStringreplace (size_t offset, size_t length, RWUChar32 codePoint, size_t repeat=1)
 
size_t rindex (const RWUSubString &pattern) const
 
size_t rindex (const RWUConstSubString &pattern) const
 
size_t rindex (size_t offset, const RWUSubString &pattern) const
 
size_t rindex (size_t offset, 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, const RWUConstSubString &pattern) const
 
RWUConstSubString strip (StripType stripType=Trailing, RWUChar32 codePoint=static_cast< RWUChar32 >(0x0020)) const
 
RWUSubString strip (StripType stripType=Trailing, RWUChar32 codePoint=static_cast< RWUChar32 >(0x0020))
 
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 RWBasicUString &source)
 
 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 (RWUChar16 *clientBuffer, Deallocator *deallocator)
 
 RWBasicUString (RWUChar16 *clientBuffer, size_t contentLength, Deallocator *deallocator)
 
 RWBasicUString (RWUChar16 *clientBuffer, size_t contentLength, size_t bufferCapacity, Deallocator *deallocator)
 
 RWBasicUString (const RWUChar32 *source)
 
 RWBasicUString (const RWUChar32 *source, size_t sourceLength)
 
 RWBasicUString (const RWSize_T &initialCapacity)
 
 RWBasicUString (RWUChar16 codeUnit, size_t repeat=1)
 
 RWBasicUString (RWUChar32 codePoint, size_t repeat=1)
 
 RWBasicUString (const char *utf8Source)
 
 RWBasicUString (const char *utf8Source, size_t length)
 
 RWBasicUString (const RWCString &utf8Source)
 
 RWBasicUString (RWBasicUString &&rhs)
 
 ~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= (RWBasicUString &&rhs)
 
RWBasicUStringoperator= (const RWBasicUString &source)
 
RWBasicUStringoperator= (const RWUChar16 *source)
 
RWBasicUStringoperator= (const RWUChar32 *source)
 
RWBasicUStringoperator= (RWUChar16 codeUnit)
 
RWBasicUStringoperator= (RWUChar32 codePoint)
 
RWUChar16operator[] (short offset)
 
RWUChar16operator[] (int offset)
 
RWUChar16operator[] (long offset)
 
RWUChar16operator[] (unsigned short offset)
 
RWUChar16operator[] (unsigned int offset)
 
RWUChar16operator[] (unsigned long offset)
 
RWUChar16operator[] (long long offset)
 
RWUChar16operator[] (unsigned long long offset)
 
RWUChar16 operator[] (short offset) const
 
RWUChar16 operator[] (int offset) const
 
RWUChar16 operator[] (long offset) const
 
RWUChar16 operator[] (unsigned short offset) const
 
RWUChar16 operator[] (unsigned int offset) const
 
RWUChar16 operator[] (unsigned long offset) const
 
RWUChar16 operator[] (long long offset) const
 
RWUChar16 operator[] (unsigned long long 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=0)
 
RWBasicUStringremove (size_t offset, size_t length)
 
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 newCodeUnitLength, RWUChar16 codeUnit)
 
void resize (size_t newCodePointLength, RWUChar32 codePoint)
 
void restoreFrom (RWvistream &vis)
 
void restoreFrom (RWFile &file)
 
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 (RWvostream &vos) const
 
void saveOn (RWFile &file) 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 Functions

(Note that these are not member functions.)

bool operator!= (const RWUString &lhs, const RWUString &rhs)
 
bool operator!= (const RWUChar16 *lhs, const RWUString &rhs)
 
bool operator!= (const RWUString &lhs, const RWUChar16 *rhs)
 
bool operator!= (const RWUChar32 *lhs, const RWUString &rhs)
 
bool operator!= (const RWUString &lhs, const RWUChar32 *rhs)
 
bool operator!= (const RWUConstSubString &lhs, const RWUString &rhs)
 
bool operator!= (const RWUString &lhs, const RWUConstSubString &rhs)
 
bool operator!= (const RWUSubString &lhs, const RWUString &rhs)
 
bool operator!= (const RWUString &lhs, const RWUSubString &rhs)
 
bool operator!= (const RWUConstSubString &lhs, const RWUSubString &rhs)
 
bool operator!= (const RWUSubString &lhs, const RWUConstSubString &rhs)
 
RWUString operator+ (const RWUString &lhs, const RWUString &rhs)
 
RWUString operator+ (const RWUChar16 *lhs, const RWUString &rhs)
 
RWUString operator+ (const RWUString &lhs, const RWUChar16 *rhs)
 
RWUString operator+ (const RWUString &lhs, const RWUSubString &rhs)
 
RWUString operator+ (const RWUSubString &lhs, const RWUString &rhs)
 
RWUString operator+ (const RWUString &lhs, const RWUConstSubString &rhs)
 
RWUString operator+ (const RWUConstSubString &lhs, const RWUString &rhs)
 
bool operator< (const RWUString &lhs, const RWUString &rhs)
 
bool operator< (const RWUChar16 *lhs, const RWUString &rhs)
 
bool operator< (const RWUString &lhs, const RWUChar16 *rhs)
 
bool operator< (const RWUChar32 *lhs, const RWUString &rhs)
 
bool operator< (const RWUString &lhs, const RWUChar32 *rhs)
 
bool operator< (const RWUConstSubString &lhs, const RWUString &rhs)
 
bool operator< (const RWUString &lhs, const RWUConstSubString &rhs)
 
bool operator< (const RWUSubString &lhs, const RWUString &rhs)
 
bool operator< (const RWUString &lhs, const RWUSubString &rhs)
 
bool operator< (const RWUConstSubString &lhs, const RWUSubString &rhs)
 
bool operator< (const RWUSubString &lhs, const RWUConstSubString &rhs)
 
std::ostream & operator<< (std::ostream &os, const RWUString::Pad &pad)
 
std::ostream & operator<< (std::ostream &os, const RWUString &ustr)
 
bool operator<= (const RWUString &lhs, const RWUString &rhs)
 
bool operator<= (const RWUChar16 *lhs, const RWUString &rhs)
 
bool operator<= (const RWUString &lhs, const RWUChar16 *rhs)
 
bool operator<= (const RWUChar32 *lhs, const RWUString &rhs)
 
bool operator<= (const RWUString &lhs, const RWUChar32 *rhs)
 
bool operator<= (const RWUConstSubString &lhs, const RWUString &rhs)
 
bool operator<= (const RWUString &lhs, const RWUConstSubString &rhs)
 
bool operator<= (const RWUSubString &lhs, const RWUString &rhs)
 
bool operator<= (const RWUString &lhs, const RWUSubString &rhs)
 
bool operator<= (const RWUConstSubString &lhs, const RWUSubString &rhs)
 
bool operator<= (const RWUSubString &lhs, const RWUConstSubString &rhs)
 
bool operator== (const RWUString &lhs, const RWUString &rhs)
 
bool operator== (const RWUChar16 *lhs, const RWUString &rhs)
 
bool operator== (const RWUString &lhs, const RWUChar16 *rhs)
 
bool operator== (const RWUChar32 *lhs, const RWUString &rhs)
 
bool operator== (const RWUString &lhs, const RWUChar32 *rhs)
 
bool operator== (const RWUConstSubString &lhs, const RWUString &rhs)
 
bool operator== (const RWUString &lhs, const RWUConstSubString &rhs)
 
bool operator== (const RWUSubString &lhs, const RWUString &rhs)
 
bool operator== (const RWUString &lhs, const RWUSubString &rhs)
 
bool operator== (const RWUConstSubString &lhs, const RWUSubString &rhs)
 
bool operator== (const RWUSubString &lhs, const RWUConstSubString &rhs)
 
bool operator> (const RWUString &lhs, const RWUString &rhs)
 
bool operator> (const RWUChar16 *lhs, const RWUString &rhs)
 
bool operator> (const RWUString &lhs, const RWUChar16 *rhs)
 
bool operator> (const RWUChar32 *lhs, const RWUString &rhs)
 
bool operator> (const RWUString &lhs, const RWUChar32 *rhs)
 
bool operator> (const RWUConstSubString &lhs, const RWUString &rhs)
 
bool operator> (const RWUString &lhs, const RWUConstSubString &rhs)
 
bool operator> (const RWUSubString &lhs, const RWUString &rhs)
 
bool operator> (const RWUString &lhs, const RWUSubString &rhs)
 
bool operator> (const RWUConstSubString &lhs, const RWUSubString &rhs)
 
bool operator> (const RWUSubString &lhs, const RWUConstSubString &rhs)
 
bool operator>= (const RWUString &lhs, const RWUString &rhs)
 
bool operator>= (const RWUChar16 *lhs, const RWUString &rhs)
 
bool operator>= (const RWUString &lhs, const RWUChar16 *rhs)
 
bool operator>= (const RWUChar32 *lhs, const RWUString &rhs)
 
bool operator>= (const RWUString &lhs, const RWUChar32 *rhs)
 
bool operator>= (const RWUConstSubString &lhs, const RWUString &rhs)
 
bool operator>= (const RWUString &lhs, const RWUConstSubString &rhs)
 
bool operator>= (const RWUSubString &lhs, const RWUString &rhs)
 
bool operator>= (const RWUString &lhs, const RWUSubString &rhs)
 
bool operator>= (const RWUConstSubString &lhs, const RWUSubString &rhs)
 
bool operator>= (const RWUSubString &lhs, const RWUConstSubString &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:

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/RWUString.h>
#include <rw/i18n/RWUConversionContext.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;
} // main

Program Output:

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

Member Typedef Documentation

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

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

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

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

Member Enumeration Documentation

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.

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.

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

Enumerator
UTF8 

 

Constructor & Destructor Documentation

RWUString::RWUString ( )
inline

Default constructor. Constructs an empty, null string.

RWUString::RWUString ( const RWUString source)
inline

Copy constructor. Constructs an RWUString from source.

RWUString::RWUString ( const RWBasicUString source)
inline

Conversion constructor. Constructs an RWUString from source.

RWUString::RWUString ( const RWUSubString source)
inline

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

RWUString::RWUString ( const RWUConstSubString source)
inline

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

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::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::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::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::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::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::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::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::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));
RWUString::RWUString ( RWUChar16  codeUnit,
size_t  repeat = 1 
)
inline

Constructs an RWUString that contains repeat copies of the codeUnit.

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::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);
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::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);
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::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::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::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::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

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

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

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().
RWUString & RWUString::append ( const RWUSubString source)
inline

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

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

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

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.

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.

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.

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.

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).

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).

RWUString::code_point_iterator RWUString::beginCodePointIterator ( )
inline

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

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.

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.

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.

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.
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.
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.

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.

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

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

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

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

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

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

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

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

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().
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().
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().
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().
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.

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.

RWUString::code_point_iterator RWUString::endCodePointIterator ( )
inline

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

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.

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.

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.

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().
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().
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().
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().
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
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.
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.

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.

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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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.

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.

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().
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().
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().
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().
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.

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()
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()
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().
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().
RWUString & RWUString::operator+= ( const RWBasicUString source)
inline

Appends the contents of source to the contents of self.

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

Appends the contents of source to the contents of self.

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

Appends the contents of source to the contents of self.

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

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

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.

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

Appends codeUnit to the contents of self.

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

Appends codePoint to the contents of self.

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.

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.

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.

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.

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.

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.

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.

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

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

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.

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

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

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().
RWUString & RWUString::prepend ( const RWUSubString source)
inline

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

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

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

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.

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.

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.

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.

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).

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).

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.

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.

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().
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().
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.

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.

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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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.

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.

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().
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().
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().
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().
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.

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.

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.

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.

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.

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.
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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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 Function Documentation

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Concatenates lhs with rhs and returns the result.

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

Concatenates lhs with rhs and returns the result.

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

Concatenates lhs with rhs and returns the result.

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

Concatenates lhs with rhs and returns the result.

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

Concatenates lhs with rhs and returns the result.

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

Concatenates lhs with rhs and returns the result.

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

Concatenates lhs with rhs and returns the result.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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.
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.
bool operator<= ( const RWUString lhs,
const RWUString rhs 
)
related

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

bool operator> ( const RWUString lhs,
const RWUString rhs 
)
related

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

bool operator> ( const RWUChar16 lhs,
const RWUString rhs 
)
related

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

bool operator> ( const RWUString lhs,
const RWUChar16 rhs 
)
related

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

bool operator> ( const RWUChar32 lhs,
const RWUString rhs 
)
related

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

bool operator> ( const RWUString lhs,
const RWUChar32 rhs 
)
related

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

bool operator> ( const RWUConstSubString lhs,
const RWUString rhs 
)
related

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

bool operator> ( const RWUString lhs,
const RWUConstSubString rhs 
)
related

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

bool operator> ( const RWUSubString lhs,
const RWUString rhs 
)
related

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

bool operator> ( const RWUString lhs,
const RWUSubString rhs 
)
related

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

bool operator> ( const RWUConstSubString lhs,
const RWUSubString rhs 
)
related

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

bool operator> ( const RWUSubString lhs,
const RWUConstSubString rhs 
)
related

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

bool operator>= ( const RWUString lhs,
const RWUString rhs 
)
related

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

bool operator>= ( const RWUChar16 lhs,
const RWUString rhs 
)
related

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

bool operator>= ( const RWUString lhs,
const RWUChar16 rhs 
)
related

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

bool operator>= ( const RWUChar32 lhs,
const RWUString rhs 
)
related

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

bool operator>= ( const RWUString lhs,
const RWUChar32 rhs 
)
related

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

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

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

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

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

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

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

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

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

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

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

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

Returns true if lhs is lexicographically greater than or equal to rhs; otherwise, false.

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 © 2022 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.