SourcePro® API Reference Guide

 
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Related Functions
RWBasicUString Class Reference

Represents and manages an array of UTF-16 values. More...

#include <rw/tools/bustring.h>

Inheritance diagram for RWBasicUString:
RWUString

Classes

class  Deallocator
 Base class for subclasses that release client-allocated storage. More...
 
class  Pad
 Inserts the contents of a Unicode string into an output stream, padding it with a designated fill character. More...
 
class  StaticDeallocator
 Forwards deallocation requests to a static callback method. More...
 

Public Types

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

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

Static Public Attributes

static const RWUChar32 DefaultFillCharacter
 

Related Functions

(Note that these are not member functions.)

bool operator!= (const RWUChar16 *lhs, const RWBasicUString &rhs)
 
bool operator!= (const RWBasicUString &lhs, const RWUChar16 *rhs)
 
bool operator!= (const RWBasicUString &lhs, const RWBasicUString &rhs)
 
bool operator!= (const RWUChar32 *lhs, const RWBasicUString &rhs)
 
bool operator!= (const RWBasicUString &lhs, const RWUChar32 *rhs)
 
bool operator< (const RWUChar16 *lhs, const RWBasicUString &rhs)
 
bool operator< (const RWBasicUString &lhs, const RWUChar16 *rhs)
 
bool operator< (const RWBasicUString &lhs, const RWBasicUString &rhs)
 
bool operator< (const RWUChar32 *lhs, const RWBasicUString &rhs)
 
bool operator< (const RWBasicUString &lhs, const RWUChar32 *rhs)
 
bool operator<= (const RWUChar16 *lhs, const RWBasicUString &rhs)
 
bool operator<= (const RWBasicUString &lhs, const RWUChar16 *rhs)
 
bool operator<= (const RWBasicUString &lhs, const RWBasicUString &rhs)
 
bool operator<= (const RWUChar32 *lhs, const RWBasicUString &rhs)
 
bool operator<= (const RWBasicUString &lhs, const RWUChar32 *rhs)
 
bool operator== (const RWUChar16 *lhs, const RWBasicUString &rhs)
 
bool operator== (const RWBasicUString &lhs, const RWUChar16 *rhs)
 
bool operator== (const RWBasicUString &lhs, const RWBasicUString &rhs)
 
bool operator== (const RWUChar32 *lhs, const RWBasicUString &rhs)
 
bool operator== (const RWBasicUString &lhs, const RWUChar32 *rhs)
 
bool operator> (const RWUChar16 *lhs, const RWBasicUString &rhs)
 
bool operator> (const RWBasicUString &lhs, const RWUChar16 *rhs)
 
bool operator> (const RWBasicUString &lhs, const RWBasicUString &rhs)
 
bool operator> (const RWUChar32 *lhs, const RWBasicUString &rhs)
 
bool operator> (const RWBasicUString &lhs, const RWUChar32 *rhs)
 
bool operator>= (const RWUChar16 *lhs, const RWBasicUString &rhs)
 
bool operator>= (const RWBasicUString &lhs, const RWUChar16 *rhs)
 
bool operator>= (const RWBasicUString &lhs, const RWBasicUString &rhs)
 
bool operator>= (const RWUChar32 *lhs, const RWBasicUString &rhs)
 
bool operator>= (const RWBasicUString &lhs, const RWUChar32 *rhs)
 
std::ostream & operator<< (std::ostream &os, const RWBasicUString &ustr)
 
RWvostreamoperator<< (RWvostream &vos, const RWBasicUString &ustr)
 
RWFileoperator<< (RWFile &file, const RWBasicUString &ustr)
 
std::istream & operator>> (std::istream &is, RWBasicUString &ustr)
 
RWvistreamoperator>> (RWvistream &vis, RWBasicUString &ustr)
 
RWFileoperator>> (RWFile &file, RWBasicUString &ustr)
 
RWvistreamoperator>> (RWvistream &vis, RWBasicUString *&ustrp)
 
RWFileoperator>> (RWFile &file, RWBasicUString *&ustrp)
 

Detailed Description

RWBasicUString is used to manage an array of UTF-16 values in the form of an array of RWUChar16 values. An instance of RWBasicUString may be constructed to use one of three memory management models:

When deallocation responsibility is passed from the client to an RWBasicUString, the client must supply a function object, or functor, that can be used to deallocate the storage. This mechanism allows the client to choose to use operator delete[], std::free(), or custom memory-management mechanisms. The use of an externally supplied deallocation method can also be used to satisfy the heap management requirements of Microsoft Windows dynamically linked libraries, which in some situations may create their own heap in addition to that of the calling process.

Given sufficient capacity, RWBasicUString adds a null terminator to any non-static array passed to it. An added null is not considered part of the contents, and is not included in the count returned by length().

Synopsis
#include <rw/tools/bustring.h>
Persistence
None

Member Typedef Documentation

A type that provides a const random-access iterator over the elements in the container.

Declares an alias for a const reference to the RWBasicUString value type.

A type that provides a const random-access, reverse-order iterator over the elements in the container.

Declares an alias for the type used to represent the distance between two RWBasicUString iterators.

A type that provides a random-access iterator over the elements in the container.

Declares an alias for a pointer to the RWBasicUString value type.

Declares an alias for a reference to the RWBasicUString value type.

typedef std::reverse_iterator<iterator> RWBasicUString::reverse_iterator

A type that provides a random-access, reverse-order iterator over the elements in the container.

This iterator type is const to prohibit modification of the underlying RWBasicUString data.

typedef size_t RWBasicUString::size_type

Declares an alias for the type used to represent non-negative values of the distance or difference type. Used for sizes and indices.

Member Enumeration Documentation

An enumeration whose values are used to indicate whether the source array provided by a client should be copied or simply referenced.

Enumerator
Transient 

Indicates that a source string or array may have a duration less than that of the RWBasicUString and must therefore be copied,

Persistent 

Indicates that a source string or array will have a duration greater than that of the RWBasicUString and may therefore be simply referenced.

Constructor & Destructor Documentation

RWBasicUString::RWBasicUString ( )
inline

Constructs an empty (null) instance.

RWBasicUString::RWBasicUString ( const RWBasicUString source)

Constructs an RWBasicUString instance from source.

The new instance either copies the data stored in source, or refers to the same storage as source, depending on the storage strategy used to construct source.

RWBasicUString::RWBasicUString ( const RWUChar16 source,
Duration  duration = Transient 
)

Constructs an RWBasicUString instance that copies or references the contents of source, a null-terminated sequence of RWUChar16 values. The new RWBasicUString 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 RWBasicUString instance still references it. The original source array cannot be modified by any of the non-const methods provided by this class. Any attempt to do so forces RWBasicUString to create a copy of source.

RWBasicUString::RWBasicUString ( const RWUChar16 source,
size_t  sourceLength,
Duration  duration = Transient 
)

Constructs an RWBasicUString instance that copies or references the contents of source, an array of RWUChar16 values that contains sourceLength elements and may contain embedded nulls. The new RWBasicUString 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 RWBasicUString instance still references it. The original source array cannot be modified by any of the non-const methods provided by this class. Any attempt to do so forces RWBasicUString to create a copy of source.

RWBasicUString::RWBasicUString ( const RWUChar16 source,
size_t  sourceLength,
size_t  initialCapacity 
)

Constructs an RWBasicUString instance that copies sourceLength characters from 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 is made to accommodate the change in length.

If the value passed for sourceLength is RW_NPOS, the source is assumed to be a null-terminated array and the entire array is copied. Otherwise, sourceLength characters are copied.

RWBasicUString::RWBasicUString ( RWUChar16 clientBuffer,
RWBasicUString::Deallocator deallocator 
)
inline

Constructs an RWBasicUString 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 the Unicode string.

The deallocator parameter is used to supply a Deallocator object that can be used to deallocate the storage referenced by clientBuffer.

Copy construction or assignment produces an RWBasicUString that refers to the same client-supplied buffer.

RWBasicUString does not synchronize access to the client-supplied buffer. External synchronization is required if multiple threads will have access to the buffer through one or more RWBasicUString instances.

RWBasicUString::RWBasicUString ( RWUChar16 clientBuffer,
size_t  contentLength,
RWBasicUString::Deallocator deallocator 
)
inline

Constructs an RWBasicUString 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 is used to supply a Deallocator object that can be used to deallocate the storage referenced by clientBuffer.

Copy construction or assignment produces an RWBasicUString that refers to the same client-supplied buffer.

RWBasicUString does not synchronize access to the client-supplied buffer. External synchronization is required if multiple threads will have access to the buffer through one or more RWBasicUString instances.

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

Constructs an RWBasicUString 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 is used to supply a Deallocator object that can be used to deallocate the storage referenced by clientBuffer.

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

If the original clientBuffer array does not possess the capacity required by an append, insert, or replace operation, the buffer is copied into an internally allocated buffer.

Copy-construction or assignment produces an RWBasicUString that refers to the same client-supplied buffer.

RWBasicUString does not synchronize access to the client-supplied buffer. External synchronization is required if multiple threads will have access to the buffer through one or more RWBasicUString instances.

RWBasicUString::RWBasicUString ( const RWUChar32 source)

Constructs an RWBasicUString from the code units produced by converting the null-terminated UCS-4 or UTF-32 encoded source into its equivalent UTF-16 representation.

RWBasicUString::RWBasicUString ( const RWUChar32 source,
size_t  sourceLength 
)

Constructs an RWBasicUString 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 sourceLength.

The source array may contain embedded nulls.

RWBasicUString::RWBasicUString ( const RWSize_T initialCapacity)

Constructs RWBasicUString containing a zero-length string and a capacity of initialCapacity.

An RWSize_T instance must be constructed to eliminate potential ambiguity with the RWBasicUString(RWUChar32,size_t) constructor.

RWBasicUString::RWBasicUString ( RWUChar16  codeUnit,
size_t  repeat = 1 
)

Constructs an RWBasicUString that contains repeat copies of the codeUnit.

RWBasicUString::RWBasicUString ( RWUChar32  codePoint,
size_t  repeat = 1 
)

Constructs an RWBasicUString 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.

RWBasicUString::RWBasicUString ( const char *  utf8Source)

Constructs an RWBasicUString instance that contains the code units produced by converting the UTF-8 encoded Unicode text in utf8Source into a UTF-16 representation.

The source string must be null-terminated.

RWBasicUString::RWBasicUString ( const char *  utf8Source,
size_t  length 
)

Constructs an RWBasicUString instance that contains the code units produced by converting the UTF-8 encoded Unicode text in utf8Source into a UTF-16 representation.

The source string length is given by length and may contain embedded nulls.

RWBasicUString::RWBasicUString ( const RWCString utf8Source)

Constructs an RWBasicUString instance that contains the code units produced by converting the UTF-8 encoded Unicode text in utf8Source into a UTF-16 representation.

RWBasicUString::RWBasicUString ( RWBasicUString &&  rhs)
inline

Move constructor. The constructed instance takes ownership of the data owned by rhs.

Condition:
This method is available only on platforms with rvalue reference support.
RWBasicUString::~RWBasicUString ( )

Destroys self. Relinquishes ownership and frees any resources used by self.

Member Function Documentation

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

Appends the contents of source to the contents of self.

RWBasicUString & RWBasicUString::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.

Exceptions
RWBoundsErrThrown if the sum of sourceOffset and sourceLength is greater than source.length().
RWBasicUString & RWBasicUString::append ( const RWUChar16 source)
inline

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

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

Appends the contents of the array source to the contents of self. The size of the source array is specified using sourceLength. The source array may contain embedded nulls.

RWBasicUString & RWBasicUString::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.

RWBasicUString & RWBasicUString::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 the contents of self. The size of the source array is specified using sourceLength.

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

Appends repeat copies of codeUnit to the contents of self. The code unit may be zero or null.

RWBasicUString & RWBasicUString::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. The code point may be zero or null.

RWBasicUString::iterator RWBasicUString::begin ( )
inline

Returns an iterator that refers to the position of the first code unit in self.

RWBasicUString::const_iterator RWBasicUString::begin ( ) const
inline

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

RWspace RWBasicUString::binaryStoreSize ( ) const

Returns the number of bytes necessary to serialize the object.

size_t RWBasicUString::boundsCheckIndex ( size_t  offset) const
inline

Returns offset if the value is in bounds.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::boundsCheckLength ( size_t  offset,
size_t  length 
) const
inline

Returns length if the value is in bounds.

Exceptions
RWBoundsErrThrown if offset plus length is greater than or equal to length().
size_t RWBasicUString::capacity ( ) const
inline

Returns the maximum number of UTF-16 code units that may be stored in self without allocating new storage.

size_t RWBasicUString::capacity ( size_t  newCapacity)

Allocates and copies the existing buffer contents as required to provide the capacity specified by newCapacity. The new capacity must be greater than or equal to the current value of length(); otherwise no reallocation or copy occurs. Returns the resultant capacity of self, which in some cases may be larger than the capacity requested.

RWBasicUString::const_iterator RWBasicUString::cbegin ( ) const
inline

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

RWBasicUString::const_iterator RWBasicUString::cend ( ) const
inline

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

size_t RWBasicUString::codePointLength ( ) const
inline

Returns the number of Unicode code points encoded by the code units contained in self, including embedded nulls. This method recalculates the result each time it is called. Use codeUnitLength() to determine the number of UTF-16 code units contained in self.

size_t RWBasicUString::codePointLength ( const RWUChar16 array)
inlinestatic

Returns the number of Unicode code points encoded by the code units in the null-terminated sequence array. The terminating null is not included in the count.

size_t RWBasicUString::codePointLength ( const RWUChar16 array,
size_t  length 
)
inlinestatic

Returns the number of Unicode code points encoded by the code units in the sequence array. The size of array is specified using length.

size_t RWBasicUString::codePointLength ( const RWUChar32 array)
inlinestatic

Returns the size of the null-terminated sequence array. The terminating null is not included in the count.

size_t RWBasicUString::codeUnitLength ( ) const
inline

Returns the number of code units contained in self, including embedded nulls. This method uses a cached value and may be called repeatedly without incurring a significant performance penalty. This method returns the same value as length(). Use codePointLength() to determine the number of Unicode code points contained in self.

size_t RWBasicUString::codeUnitLength ( const RWUChar16 array)
inlinestatic

Returns the size of the null-terminated sequence array. The terminating null is not included in the count.

size_t RWBasicUString::codeUnitLength ( const RWUChar32 array)
inlinestatic

Returns the number of UTF-16 code units required to encode the null-terminated UTF-32 code point sequence contained in array. The terminating null is not included in the count.

size_t RWBasicUString::codeUnitLength ( const RWUChar32 array,
size_t  length 
)
inlinestatic

Returns the number of UTF-16 code units required to encode the UTF-32 code point sequence contained in array. The size of array is specified using length.

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

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

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

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

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

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

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

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

Exceptions
RWBoundsErrThrown if the sum of rhsOffset and rhsLength is greater than rhs.length().
int RWBasicUString::compareCodePoints ( const RWUChar16 rhs) const
inline

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Exceptions
RWBoundsErrThrown if the sum of rhsOffset and rhsLength is greater than rhs.length().
int RWBasicUString::compareCodeUnits ( const RWUChar16 rhs) const
inline

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

RWUChar32 RWBasicUString::computeCodePointValue ( RWUChar16  highSurrogate,
RWUChar16  lowSurrogate 
)
inlinestatic

Returns the code point value encoded by the specified pair of code units. The code units must describe a valid surrogate pair. Any other values produce an undefined and erroneous result.

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

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

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

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

Exceptions
RWBoundsErrThrown if the sum of patternOffset and patternLength is greater than pattern.length().
bool RWBasicUString::contains ( const RWUChar16 pattern) const
inline

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

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

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

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

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

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

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

bool RWBasicUString::contains ( RWUChar16  codeUnit) const
inline

Returns true if self contains codeUnit, otherwise returns false.

bool RWBasicUString::contains ( RWUChar32  codePoint) const
inline

Returns true if self contains codePoint, otherwise returns false.

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

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
bool RWBasicUString::contains ( size_t  offset,
const RWBasicUString pattern,
size_t  patternOffset,
size_t  patternLength 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length(), or the sum of patternOffset and patternLength is greater than pattern.length().
bool RWBasicUString::contains ( size_t  offset,
const RWUChar16 pattern 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
bool RWBasicUString::contains ( size_t  offset,
const RWUChar16 pattern,
size_t  patternLength 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
bool RWBasicUString::contains ( size_t  offset,
const RWUChar32 pattern 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
bool RWBasicUString::contains ( size_t  offset,
const RWUChar32 pattern,
size_t  patternLength 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
bool RWBasicUString::contains ( size_t  offset,
RWUChar16  codeUnit 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
bool RWBasicUString::contains ( size_t  offset,
RWUChar32  codePoint 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
bool RWBasicUString::contains ( size_t  offset,
size_t  length,
const RWBasicUString pattern 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
bool RWBasicUString::contains ( size_t  offset,
size_t  length,
const RWBasicUString pattern,
size_t  patternOffset,
size_t  patternLength 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length(), or the sum of patternOffset and patternLength is greater than pattern.length().
bool RWBasicUString::contains ( size_t  offset,
size_t  length,
const RWUChar16 pattern 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
bool RWBasicUString::contains ( size_t  offset,
size_t  length,
const RWUChar16 pattern,
size_t  patternLength 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
bool RWBasicUString::contains ( size_t  offset,
size_t  length,
const RWUChar32 pattern 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
bool RWBasicUString::contains ( size_t  offset,
size_t  length,
const RWUChar32 pattern,
size_t  patternLength 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
bool RWBasicUString::contains ( size_t  offset,
size_t  length,
RWUChar16  codeUnit 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
bool RWBasicUString::contains ( size_t  offset,
size_t  length,
RWUChar32  codePoint 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
RWBasicUString::const_reverse_iterator RWBasicUString::crbegin ( ) const
inline

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

RWBasicUString::const_reverse_iterator RWBasicUString::crend ( ) const
inline

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

const RWUChar16 * RWBasicUString::data ( ) const
inline

Returns a pointer to the contents of self. The storage referenced by this pointer is owned by RWBasicUString and may not be deleted or modified. The pointer becomes invalid if self is modified or destroyed. The contents may not be null-terminated if the client provided the underlying buffer and there was insufficient space for a terminating null. In all other cases, the contents will be null terminated. The contents may contain embedded nulls, in which case the length of the code-unit sequence is determined using length().

bool RWBasicUString::empty ( ) const
inline

Returns true if self has a length of zero, otherwise returns false. This method requires constant time, while length() == 0 may require linear time to execute. This method is equivalent to isNull().

RWBasicUString::iterator RWBasicUString::end ( )
inline

Returns an iterator that refers to the position after the last code unit in self.

RWBasicUString::const_iterator RWBasicUString::end ( ) const
inline

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

bool RWBasicUString::equals ( const RWBasicUString array) const

Returns true if the contents and length of self are identical to array, otherwise returns false. This method is more efficient than compareCodeUnits() when testing for equality.

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

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

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

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

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

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

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

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

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

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

size_t RWBasicUString::first ( RWUChar16  codeUnit) const
inline

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

size_t RWBasicUString::first ( RWUChar32  codePoint) const
inline

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

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

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::first ( size_t  offset,
const RWUChar16 codeUnitSet 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::first ( size_t  offset,
const RWUChar16 codeUnitSet,
size_t  numCodeUnits 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::first ( size_t  offset,
const RWUChar32 codePointSet 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::first ( size_t  offset,
const RWUChar32 codePointSet,
size_t  numCodePoints 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::first ( size_t  offset,
RWUChar16  codeUnit 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::first ( size_t  offset,
RWUChar32  codePoint 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::first ( size_t  offset,
size_t  length,
const RWBasicUString codeUnitSet 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::first ( size_t  offset,
size_t  length,
const RWUChar16 codeUnitSet 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::first ( size_t  offset,
size_t  length,
const RWUChar16 codeUnitSet,
size_t  numCodeUnits 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::first ( size_t  offset,
size_t  length,
const RWUChar32 codePointSet 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::first ( size_t  offset,
size_t  length,
const RWUChar32 codePointSet,
size_t  numCodePoints 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::first ( size_t  offset,
size_t  length,
RWUChar16  codeUnit 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::first ( size_t  offset,
size_t  length,
RWUChar32  codePoint 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
static Deallocator* RWBasicUString::getNullDeallocator ( )
static

Retrieves a deallocator for use in constructing an RWBasicUString instance that has been given access to a client-owned and managed buffer.

RWBasicUString buffer[32]; // Client owned array

The Deallocator object is owned by this class and must not be deleted.

unsigned long RWBasicUString::hash ( ) const

Returns a hash value computed from the contents of self.

RWUChar16 RWBasicUString::highSurrogate ( RWUChar32  codePoint)
inlinestatic

Returns the high, UTF-16 surrogate (0xD800..0xDBFF) for a code point in the range 0x10000..0x10FFFF.

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

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

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

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

Exceptions
RWBoundsErrThrown if the sum of patternOffset and patternLength is greater than pattern.length().
size_t RWBasicUString::index ( const RWUChar16 pattern) const
inline

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

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

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

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

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

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

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

size_t RWBasicUString::index ( RWUChar16  codeUnit) const
inline

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

size_t RWBasicUString::index ( RWUChar32  codePoint) const
inline

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

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

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::index ( size_t  offset,
const RWBasicUString pattern,
size_t  patternOffset,
size_t  patternLength 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length(), or if the sum of patternOffset and patternLength is greater than pattern.length().
size_t RWBasicUString::index ( size_t  offset,
const RWUChar16 pattern 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::index ( size_t  offset,
const RWUChar16 pattern,
size_t  patternLength 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::index ( size_t  offset,
const RWUChar32 pattern 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::index ( size_t  offset,
const RWUChar32 pattern,
size_t  patternLength 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::index ( size_t  offset,
RWUChar16  codeUnit 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::index ( size_t  offset,
RWUChar32  codePoint 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::index ( size_t  offset,
size_t  length,
const RWBasicUString pattern 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::index ( size_t  offset,
size_t  length,
const RWBasicUString pattern,
size_t  patternOffset,
size_t  patternLength 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length() or if the sum of patternOffset and patternLength is greater than pattern.length().
size_t RWBasicUString::index ( size_t  offset,
size_t  length,
const RWUChar16 pattern 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::index ( size_t  offset,
size_t  length,
const RWUChar16 pattern,
size_t  patternLength 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::index ( size_t  offset,
size_t  length,
const RWUChar32 pattern 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::index ( size_t  offset,
size_t  length,
const RWUChar32 pattern,
size_t  patternLength 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::index ( size_t  offset,
size_t  length,
RWUChar16  codeUnit 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::index ( size_t  offset,
size_t  length,
RWUChar32  codePoint 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
RWBasicUString & RWBasicUString::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().
RWBasicUString & RWBasicUString::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.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length() or if the sum of sourceOffset and sourceLength is greater than source.length().
RWBasicUString & RWBasicUString::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 or equal to length().
RWBasicUString & RWBasicUString::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 or equal to length().
RWBasicUString & RWBasicUString::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 or equal to length().
RWBasicUString & RWBasicUString::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.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWBasicUString & RWBasicUString::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 or null.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWBasicUString & RWBasicUString::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 or null.

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
bool RWBasicUString::isHighSurrogate ( RWUChar16  codeUnit)
inlinestatic

Returns true if codeUnit encodes the high surrogate of a surrogate pair, otherwise returns false.

bool RWBasicUString::isLowSurrogate ( RWUChar16  codeUnit)
inlinestatic

Returns true if codeUnit encodes the low surrogate of a surrogate pair, otherwise returns false.

bool RWBasicUString::isNull ( void  ) const
inline

Returns true if self has a length of zero, otherwise returns false. This method requires constant time while length() == 0 may require linear time to execute. This method is equivalent to empty().

bool RWBasicUString::isUnicodeCharacter ( RWUChar32  codePoint)
inlinestatic

Returns true if codePoint is a valid Unicode character, otherwise returns false.

Non-characters include:

  • single surrogate code points (U+d800..U+dfff, 2048 code points)
  • the last two code points on each plane (U+__fffe and U+__ffff, 34 code points)
  • U+fdd0..U+fdef (new with Unicode 3.1, 32 code points)
  • code point values above U+10ffff
size_t RWBasicUString::last ( const RWBasicUString codeUnitSet) const
inline

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

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

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

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

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

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

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

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

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

size_t RWBasicUString::last ( RWUChar16  codeUnit) const
inline

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

size_t RWBasicUString::last ( RWUChar32  codePoint) const
inline

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

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

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::last ( size_t  offset,
const RWUChar16 codeUnitSet 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::last ( size_t  offset,
const RWUChar16 codeUnitSet,
size_t  numCodeUnits 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::last ( size_t  offset,
const RWUChar32 codePointSet 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::last ( size_t  offset,
const RWUChar32 codePointSet,
size_t  numCodePoints 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::last ( size_t  offset,
RWUChar16  codeUnit 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::last ( size_t  offset,
RWUChar32  codePoint 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::last ( size_t  offset,
size_t  length,
const RWBasicUString codeUnitSet 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::last ( size_t  offset,
size_t  length,
const RWUChar16 codeUnitSet 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::last ( size_t  offset,
size_t  length,
const RWUChar16 codeUnitSet,
size_t  numCodeUnits 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::last ( size_t  offset,
size_t  length,
const RWUChar32 codePointSet 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::last ( size_t  offset,
size_t  length,
const RWUChar32 codePointSet,
size_t  numCodePoints 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::last ( size_t  offset,
size_t  length,
RWUChar16  codeUnit 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::last ( size_t  offset,
size_t  length,
RWUChar32  codePoint 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::length ( ) const
inline

Returns the number of UTF-16 code units contained in self, including embedded nulls. This method returns the same value as codeUnitLength(). Use codePointLength() to determine the number of Unicode code points contained in self.

RWUChar16 RWBasicUString::lowSurrogate ( RWUChar32  codePoint)
inlinestatic

Returns the second or low UTF-16 surrogate (0xDC00..0xDFFF) for a code point in the range 0x10000..0x10FFFF.

size_t RWBasicUString::max_size ( ) const
inline

Returns the maximum number of code units that may be stored in an RWBasicUString instance.

RWBasicUString::operator const RWUChar16 * ( ) const
inline

Returns a pointer to the contents of self. This array is owned by RWBasicUString and may not be deleted or modified. The pointer becomes invalid if self is modified or destroyed.

The contents may not be null-terminated if the client provided the underlying buffer and there was insufficient space for a terminating null. In all other cases, the contents will be null terminated.

The array may also contain embedded nulls, in which case the length of the code-unit sequence can be determined using length().

RWUChar16 & RWBasicUString::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
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWUChar16 RWBasicUString::operator() ( size_t  offset) const
inline

Returns the code unit value at the position specified by offset.

Note
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWBasicUString & RWBasicUString::operator+= ( const RWBasicUString source)
inline

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

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

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

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

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

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

Appends codeUnit to the contents of self and returns a reference to self.

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

Appends codePoint to the contents of self and returns a reference to self.

RWBasicUString & RWBasicUString::operator= ( RWBasicUString &&  rhs)
inline

Move assignment. Self takes ownership of the data owned by rhs.

Condition:
This method is available only on platforms with rvalue reference support.
RWBasicUString& RWBasicUString::operator= ( const RWBasicUString source)

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

RWBasicUString& RWBasicUString::operator= ( const RWUChar16 source)

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

RWBasicUString& RWBasicUString::operator= ( const RWUChar32 source)

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.

RWBasicUString& RWBasicUString::operator= ( RWUChar16  codeUnit)

Replaces the contents of self with the single code unit codeUnit and returns a reference to self.

RWBasicUString& RWBasicUString::operator= ( RWUChar32  codePoint)

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.

RWUChar16 & RWBasicUString::operator[] ( short  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
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWUChar16 & RWBasicUString::operator[] ( int  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
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWUChar16 & RWBasicUString::operator[] ( long  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
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWUChar16 & RWBasicUString::operator[] ( unsigned short  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
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWUChar16 & RWBasicUString::operator[] ( unsigned int  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
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWUChar16 & RWBasicUString::operator[] ( unsigned long  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
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWUChar16 & RWBasicUString::operator[] ( long long  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
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWUChar16 & RWBasicUString::operator[] ( unsigned long long  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
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWUChar16 RWBasicUString::operator[] ( short  offset) const
inline

Returns the code unit value at the position specified by offset.

Note
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWUChar16 RWBasicUString::operator[] ( int  offset) const
inline

Returns the code unit value at the position specified by offset.

Note
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWUChar16 RWBasicUString::operator[] ( long  offset) const
inline

Returns the code unit value at the position specified by offset.

Note
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWUChar16 RWBasicUString::operator[] ( unsigned short  offset) const
inline

Returns the code unit value at the position specified by offset.

Note
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWUChar16 RWBasicUString::operator[] ( unsigned int  offset) const
inline

Returns the code unit value at the position specified by offset.

Note
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWUChar16 RWBasicUString::operator[] ( unsigned long  offset) const
inline

Returns the code unit value at the position specified by offset.

Note
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWUChar16 RWBasicUString::operator[] ( long long  offset) const
inline

Returns the code unit value at the position specified by offset.

Note
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWUChar16 RWBasicUString::operator[] ( unsigned long long  offset) const
inline

Returns the code unit value at the position specified by offset.

Note
An individual code unit may not represent a complete code point.
Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWBasicUString & RWBasicUString::prepend ( const RWBasicUString source)
inline

Prepends the contents of source to the contents of self.

RWBasicUString & RWBasicUString::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. The range starts 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().
RWBasicUString & RWBasicUString::prepend ( const RWUChar16 source)
inline

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

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

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

RWBasicUString & RWBasicUString::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 the contents of self.

RWBasicUString & RWBasicUString::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 the contents of self. The size of the source array is specified using sourceLength.

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

Prepends repeat copies of codeUnit to the contents of self. The code unit may be zero or null.

RWBasicUString & RWBasicUString::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. The code point may be zero or null.

RWBasicUString::reverse_iterator RWBasicUString::rbegin ( )
inline

Returns a reverse_iterator that refers to the position of the last code unit in self.

RWBasicUString::const_reverse_iterator RWBasicUString::rbegin ( ) const
inline

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

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

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
RWBasicUString & RWBasicUString::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.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
RWBasicUString::reverse_iterator RWBasicUString::rend ( )
inline

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

RWBasicUString::const_reverse_iterator RWBasicUString::rend ( ) const
inline

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

RWBasicUString & RWBasicUString::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. The sum of offset and length must be less than or equal to length().

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
RWBasicUString & RWBasicUString::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. The range in self starts at index offset and extends for length code units. The range in source starts 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().
RWBasicUString & RWBasicUString::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. The range in self starts at index offset and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
RWBasicUString & RWBasicUString::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. The range in self starts at index offset 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().
RWBasicUString & RWBasicUString::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. The range in self starts at index offset and extends for length code units.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
RWBasicUString & RWBasicUString::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. The range in self starts at index offset 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().
RWBasicUString & RWBasicUString::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. The range in self starts at index offset and extends for length code units. The code unit may be zero or null.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
RWBasicUString & RWBasicUString::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. The range in self starts at index offset and extends for length code units. The code point may be zero or null.

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
bool RWBasicUString::requiresSurrogatePair ( RWUChar32  codeUnit)
inlinestatic

Returns true if the UTF-16 representation of codeUnit requires the use of a surrogate pair, otherwise returns false.

void RWBasicUString::resize ( size_t  newCodeUnitLength,
RWUChar16  codeUnit 
)
inline

Pads or truncates the contents of self as required to produce a length() of newCodeUnitLength. If the new length is greater than the old length, codeUnit is used to pad the contents.

void RWBasicUString::resize ( size_t  newCodePointLength,
RWUChar32  codePoint 
)

Pads or truncates the contents of self as required to produce a length() of newCodePointLength. If the new length is greater than the old length, codePoint is used to pad the contents.

void RWBasicUString::restoreFrom ( RWvistream vis)

Replaces the contents of self with the code unit sequence read from vis.

void RWBasicUString::restoreFrom ( RWFile file)

Replaces the contents of self with the code unit sequence read from file.

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

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

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

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

Exceptions
RWBoundsErrThrown if the sum of patternOffset and patternLength is greater than pattern.length().
size_t RWBasicUString::rindex ( const RWUChar16 pattern) const
inline

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

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

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

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

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

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

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

size_t RWBasicUString::rindex ( RWUChar16  codeUnit) const
inline

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

size_t RWBasicUString::rindex ( RWUChar32  codePoint) const
inline

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

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

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::rindex ( size_t  offset,
const RWBasicUString pattern,
size_t  patternOffset,
size_t  patternLength 
) const
inline

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

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length(), or the sum of patternOffset and patternLength is greater than length().
size_t RWBasicUString::rindex ( size_t  offset,
const RWUChar16 pattern 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::rindex ( size_t  offset,
const RWUChar16 pattern,
size_t  patternLength 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::rindex ( size_t  offset,
const RWUChar32 pattern 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::rindex ( size_t  offset,
const RWUChar32 pattern,
size_t  patternLength 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::rindex ( size_t  offset,
RWUChar16  codeUnit 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::rindex ( size_t  offset,
RWUChar32  codePoint 
) const
inline

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

Exceptions
RWBoundsErrThrown if offset is greater than or equal to length().
size_t RWBasicUString::rindex ( size_t  offset,
size_t  length,
const RWBasicUString pattern 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::rindex ( size_t  offset,
size_t  length,
const RWBasicUString pattern,
size_t  patternOffset,
size_t  patternLength 
) const
inline

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

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length(), or the sum of patternOffset and patternLength is greater than pattern.length().
size_t RWBasicUString::rindex ( size_t  offset,
size_t  length,
const RWUChar16 pattern 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::rindex ( size_t  offset,
size_t  length,
const RWUChar16 pattern,
size_t  patternLength 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::rindex ( size_t  offset,
size_t  length,
const RWUChar32 pattern 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::rindex ( size_t  offset,
size_t  length,
const RWUChar32 pattern,
size_t  patternLength 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::rindex ( size_t  offset,
size_t  length,
RWUChar16  codeUnit 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
size_t RWBasicUString::rindex ( size_t  offset,
size_t  length,
RWUChar32  codeUnit 
) const
inline

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

Exceptions
RWBoundsErrThrown if the sum of offset and length is greater than length().
void RWBasicUString::saveOn ( RWvostream vos) const

Writes the binary contents of self to vos as an array of 16-bit values.

void RWBasicUString::saveOn ( RWFile file) const

Writes the binary contents of self to file as an array of 16-bit values.

size_t RWBasicUString::size ( ) const
inline

Returns the size of the code unit sequence contained in self. This method is an alias for length().

size_t RWBasicUString::skipLeading ( RWUChar32  codePoint = static_cast< RWUChar32 >(0x0020)) const

Returns the offset of the code unit in self that immediately follows a prefix consisting of a repeated set of code units that correspond to codePoint. If no such prefix exists, a value of 0 is returned. If the contents of self consists entirely of a repeated sequence of codePoint, a value equal to length() is returned. The skip code point defaults to U+0020, the US-ASCII space character.

size_t RWBasicUString::skipTrailing ( RWUChar32  codePoint = static_cast< RWUChar32 >(0x0020)) const

Returns the offset of the code unit in self that immediately precedes a suffix consisting of a repeated set of code units that correspond to codePoint. If no such suffix exists, a value length() is returned. If the contents of self consists entirely of a repeated sequence of codePoint, a value of RW_NPOS is returned. The skip code point defaults to U+0020, the US-ASCII space character.

void RWBasicUString::swap ( RWBasicUString ustr)
inline

Swaps the contents of self with that of ustr. This method is provided to satisfy the C++ Standard Library requirements for a container.

std::basic_string<RWUChar32> RWBasicUString::toUtf32 ( ) const

Returns a UTF-32 encoded representation of the contents of self.

Exceptions
RWConversionErrThrown if an illegal or truncated surrogate pair is encountered during the conversion.
RWCString RWBasicUString::toUtf8 ( size_t  numCodePoints = RW_NPOS) const

Returns a UTF-8 encoded representation of the contents of self.

RWWString RWBasicUString::toWide ( ) const

Returns an RWWString containing a UTF-16 or UTF-32 representation of the contents of self, depending on the size of wchar_t. If sizeof(wchar_t) is 2, the RWWString is encoded in UTF-16. If sizeof(wchar_t) is 4, the RWWString is encoded in UTF-32.

This method produces Unicode-encoded wide-character strings. This encoding may not match that of the execution environment. The "native" encoding for wchar_t strings may be determined by the current ANSI/POSIX LC_CTYPE locale and the execution environment. Many environments use Unicode (ISO-10646) as the native encoding for wchar_t. For those that do, the choice of encoding is typically made based on the size of wchar_t.

Exceptions
RWConversionErrThrown if an illegal or truncated surrogate pair is encountered during the conversion to UTF-32. Such errors are ignored if the result is encoded as UTF-16.
void RWBasicUString::USE_DELETE ( RWUChar16 p)
inlinestatic

Uses the C++ operator delete[] expression to deallocate an array that was allocated using operator new.

The method must be defined as an inline method to ensure that the code generated to implement the delete resides in the client library or executable, and not within the Essential Tools library.

The code must be compiled this way to avoid the problems that arise when an application contains some libraries that use debug versions of heap management routines while others do not.

void RWBasicUString::USE_FREE ( RWUChar16 p)
inlinestatic

Calls the C++ Standard Library function std::free() method to deallocate an array that was allocated by a call to std::malloc().

The method must be defined as an inline method to ensure that the version of std::free() called by this method is the same version that is used within the client code, and that it manipulates the same heap as that of std::malloc().

The code must be compiled this way to avoid the problems that arise when an application contains some libraries that use debug versions of heap management routines while others do not.

void RWBasicUString::USE_NONE ( RWUChar16 p)
inlinestatic

When passed to the constructor of StaticDeallocator, results in a StaticDeallocator instance that does nothing.

Use this method when constructing an RWBasicUString instance that has been given access to a client-owned and managed buffer.

static RWUChar32 RWBasicUString::validateCodePoint ( RWUChar32  codePoint)
static

Returns codePoint if it is valid. Invalid characters include:

  • single surrogate code points (U+d800..U+dfff, 2048 code points)
  • the last two code points on each plane (U+__fffe and U+__ffff, 34 code points)
  • U+fdd0..U+fdef (new with Unicode 3.1, 32 code points)
  • values greater than the last Unicode code point value, U+10ffff

This method may be used anywhere an individual code point value is passed to a method:

RWUChar32 indentationCharacter = ...
RWBasicUString indent(validateCodePoint(indentationCharacter),8);
Exceptions
RWConversionErrThrown if codePoint is not a valid Unicode character.

Friends And Related Function Documentation

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

Returns true if lhs does not have the same length as, or lexically differs from rhs, otherwise returns false. The lhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodeUnits() in that case. This operator represents the logical negation of operator==(const RWUChar16*,const RWBasicUString&).

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

Returns true if lhs does not have the same length as, or lexically differs from rhs, otherwise returns false. The rhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodeUnits() in that case. This operator represents the logical negation of operator==(const RWBasicUString&, const RWUChar16*).

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

Returns true if lhs does not have the same length as, or lexically differs from rhs, otherwise returns false. This operator represents the logical negation of operator==(const RWBasicUString&,const RWBasicUString&).

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

Returns true if lhs does not have the same length as, or lexically differs from rhs, otherwise returns false. The lhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodePoints() in that case. This operator represents the logical negation of operator==(const RWUChar32*,const RWBasicUString&).

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

Returns true if lhs is lexically greater than or equal to rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the longer array is considered greater than the shorter array. The rhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodePoints() in that case. This operator represents the logical negation of operator==(const RWBasicUString&,const RWUChar32*).

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

Returns true if lhs is lexically less than rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the shorter array is considered less than the longer array. The lhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodeUnits() in that case.

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

Returns true if lhs is lexically less than rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the shorter array is considered less than the longer array. The rhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodeUnits() in that case.

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

Returns true if lhs is lexically less than rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the shorter array is considered less than the longer array.

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

Returns true if lhs is lexically less than rhs; otherwise, returns false. If the two arrays are identical over the length of the shortest array, then the shorter array is considered less than the longer array. The lhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodePoints() in that case.

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

Returns true if lhs is lexically less than rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the shorter array is considered less than the longer array. The rhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodePoints() in that case.

std::ostream & operator<< ( std::ostream &  os,
const RWBasicUString ustr 
)
related

Converts the contents of ustr into a UTF-8 sequence and writes that sequence to the output stream. The output sequence may contain embedded nulls.

If the width() of the output stream 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 the width() is less than the number of code points contained in the source string, the entire contents of the string is inserted into the output stream. Any padding is inserted after the string if the ios_base::left format flag is set, or before if ios_base::right is set or neither flag is set.

Exceptions
RWConversionErrThrown to report conversion errors.
std::ios_base::failureThrown to report any errors detected while performing stream operations.
RWvostream & operator<< ( RWvostream vos,
const RWBasicUString ustr 
)
related

Converts the contents of ustr into a UTF-8 sequence and writes that sequence to the output stream. The output sequence may contain embedded nulls.

If the width() of the output stream 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 the width() is less than the number of code points contained in the source string, the entire contents of the string is inserted into the output stream. Any padding is inserted after the string if the ios_base::left format flag is set, or before if ios_base::right is set or neither flag is set.

Exceptions
RWConversionErrThrown to report conversion errors.
std::ios_base::failureThrown to report any errors detected while performing stream operations.
RWFile & operator<< ( RWFile file,
const RWBasicUString ustr 
)
related

Converts the contents of ustr into a UTF-8 sequence and writes that sequence to the output stream. The output sequence may contain embedded nulls.

If the width() of the output stream 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 the width() is less than the number of code points contained in the source string, the entire contents of the string is inserted into the output stream. Any padding is inserted after the string if the ios_base::left format flag is set, or before if ios_base::right is set or neither flag is set.

Exceptions
RWConversionErrThrown to report conversion errors.
std::ios_base::failureThrown to report any errors detected while performing stream operations.
bool operator<= ( const RWUChar16 lhs,
const RWBasicUString rhs 
)
related

Returns true if lhs is lexically less than or equal to rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the shorter array is considered less than the longer array. The lhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodeUnits() in that case.

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

Returns true if lhs is lexically less than or equal to rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the shorter array is considered less than the longer array. The rhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodeUnits() in that case.

bool operator<= ( const RWBasicUString lhs,
const RWBasicUString rhs 
)
related

Returns true if lhs is lexically less than or equal to rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the shorter array is considered less than the longer array.

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

Returns true if lhs is lexically less than or equal to rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the shorter array is considered less than the longer array. The lhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodePoints() in that case.

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

Returns true if lhs is lexically less than or equal to rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the shorter array is considered less than the longer array. The rhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodePoints() in that case.

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

Returns true if lhs has the same length and is lexically identical to rhs, otherwise returns false. The lhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodeUnits() in that case.

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

Returns true if lhs has the same length and is lexically identical to rhs, otherwise returns false. The rhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodeUnits() in that case.

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

Returns true if lhs has the same length and is lexically identical to rhs, otherwise returns false.

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

Returns true if lhs has the same length and is lexically identical to rhs, otherwise returns false. The lhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodePoints() in that case.

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

Returns true if lhs has the same length and is lexically identical to rhs, otherwise returns false. The rhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodePoints() in that case.

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

Returns true if lhs is lexically greater than rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the longer array is considered greater than the shorter array. The lhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodeUnits() in that case.

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

Returns true if lhs is lexically greater than rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the longer array is considered greater than the shorter array. The rhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodeUnits() in that case.

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

Returns true if lhs is lexically greater than rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the longer array is considered greater than the shorter array.

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

Returns true if lhs is lexically greater than rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the longer array is considered greater than the shorter array. The lhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodePoints() in that case.

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

Returns true if lhs is lexically greater than rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the longer array is considered greater than the shorter array. The rhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodePoints() in that case.

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

Returns true if lhs is lexically greater than or equal to rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the longer array is considered greater than the shorter array. The lhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodeUnits() in that case.

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

Returns true if lhs is lexically greater than or equal to rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the longer array is considered greater than the shorter array. The rhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodeUnits() in that case.

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

Returns true if lhs is lexically greater than or equal to rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the longer array is considered greater than the shorter array.

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

Returns true if lhs is lexically greater than or equal to rhs, otherwise returns false. If the two arrays are identical over the length of the shortest array, then the longer array is considered greater than the shorter array. The lhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodePoints() in that case.

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

Returns true if lhs does not have the same length as, or lexically differs from rhs, otherwise returns false. The rhs array must be null-terminated. This method cannot be used to compare arrays containing embedded nulls. Use RWBasicUString::compareCodePoints() in that case.

std::istream & operator>> ( std::istream &  is,
RWBasicUString ustr 
)
friend

Reads a UTF-8 encoded string from the input stream and stores it in the provided RWBasicUString instance. Leading white space is always skipped before storing any code points, regardless of the ios::skipws format flag setting. Code points are then extracted until:

  • if the stream width() is greater than zero, until width() code points have been read
  • a whitespace code point has been read
  • the end of the input sequence has been 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+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+2028 LINE SEPARATOR
  • U+2029 PARAGRAPH SEPARATOR
  • U+205F MEDIUM MATHEMATICAL SPACE
  • 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 ios_base::skipws format flag has been cleared because each extraction would consume one whitespace character. A whitespace manipulator is not provided either, since such a manipulator would consume the first non-whitespace character following a sequence of whitespace characters.

Exceptions
RWConversionErrThrown to report conversion errors.
std::ios_base::failureThrown to report any errors detected while performing stream operations.

If the virtual stream or file experience an error while extracting the string, the operator returns the original string contents unmodified. Check the virtual stream or file to determine if an error occurred on extraction.

RWvistream & operator>> ( RWvistream vis,
RWBasicUString ustr 
)
related

Reads a UTF-8 encoded string from the input stream and stores it in the provided RWBasicUString instance. Leading white space is always skipped before storing any code points, regardless of the ios::skipws format flag setting. Code points are then extracted until:

  • if the stream width() is greater than zero, until width() code points have been read
  • a whitespace code point has been read
  • the end of the input sequence has been 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+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+2028 LINE SEPARATOR
  • U+2029 PARAGRAPH SEPARATOR
  • U+205F MEDIUM MATHEMATICAL SPACE
  • 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 ios_base::skipws format flag has been cleared because each extraction would consume one whitespace character. A whitespace manipulator is not provided either, since such a manipulator would consume the first non-whitespace character following a sequence of whitespace characters.

Exceptions
RWConversionErrThrown to report conversion errors.
std::ios_base::failureThrown to report any errors detected while performing stream operations.

If the virtual stream or file experience an error while extracting the string, the operator returns the original string contents unmodified. Check the virtual stream or file to determine if an error occurred on extraction.

RWFile & operator>> ( RWFile file,
RWBasicUString ustr 
)
related

Reads a UTF-8 encoded string from the input stream and stores it in the provided RWBasicUString instance. Leading white space is always skipped before storing any code points, regardless of the ios::skipws format flag setting. Code points are then extracted until:

  • if the stream width() is greater than zero, until width() code points have been read
  • a whitespace code point has been read
  • the end of the input sequence has been 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+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+2028 LINE SEPARATOR
  • U+2029 PARAGRAPH SEPARATOR
  • U+205F MEDIUM MATHEMATICAL SPACE
  • 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 ios_base::skipws format flag has been cleared because each extraction would consume one whitespace character. A whitespace manipulator is not provided either, since such a manipulator would consume the first non-whitespace character following a sequence of whitespace characters.

Exceptions
RWConversionErrThrown to report conversion errors.
std::ios_base::failureThrown to report any errors detected while performing stream operations.

If the virtual stream or file experience an error while extracting the string, the operator returns the original string contents unmodified. Check the virtual stream or file to determine if an error occurred on extraction.

RWvistream & operator>> ( RWvistream vis,
RWBasicUString *&  ustrp 
)
related

Reads a UTF-8 encoded string from the input stream and stores it in the provided RWBasicUString instance. Leading white space is always skipped before storing any code points, regardless of the ios::skipws format flag setting. Code points are then extracted until:

  • if the stream width() is greater than zero, until width() code points have been read
  • a whitespace code point has been read
  • the end of the input sequence has been 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+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+2028 LINE SEPARATOR
  • U+2029 PARAGRAPH SEPARATOR
  • U+205F MEDIUM MATHEMATICAL SPACE
  • 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 ios_base::skipws format flag has been cleared because each extraction would consume one whitespace character. A whitespace manipulator is not provided either, since such a manipulator would consume the first non-whitespace character following a sequence of whitespace characters.

Exceptions
RWConversionErrThrown to report conversion errors.
std::ios_base::failureThrown to report any errors detected while performing stream operations.

If the virtual stream or file experience an error while extracting the string, the operator returns the original string contents unmodified. Check the virtual stream or file to determine if an error occurred on extraction.

RWFile & operator>> ( RWFile file,
RWBasicUString *&  ustrp 
)
related

Reads a UTF-8 encoded string from the input stream and stores it in the provided RWBasicUString instance. Leading white space is always skipped before storing any code points, regardless of the ios::skipws format flag setting. Code points are then extracted until:

  • if the stream width() is greater than zero, until width() code points have been read
  • a whitespace code point has been read
  • the end of the input sequence has been 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+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+2028 LINE SEPARATOR
  • U+2029 PARAGRAPH SEPARATOR
  • U+205F MEDIUM MATHEMATICAL SPACE
  • 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 ios_base::skipws format flag has been cleared because each extraction would consume one whitespace character. A whitespace manipulator is not provided either, since such a manipulator would consume the first non-whitespace character following a sequence of whitespace characters.

Exceptions
RWConversionErrThrown to report conversion errors.
std::ios_base::failureThrown to report any errors detected while performing stream operations.

If the virtual stream or file experience an error while extracting the string, the operator returns the original string contents unmodified. Check the virtual stream or file to determine if an error occurred on extraction.

Member Data Documentation

const RWUChar32 RWBasicUString::DefaultFillCharacter
static

A static constant representing the Unicode space character.

Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.