SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
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 char *utf8Source)
 
 RWBasicUString (const char *utf8Source, size_t length)
 
 RWBasicUString (const RWBasicUString &source)
 
 RWBasicUString (const RWCString &utf8Source)
 
 RWBasicUString (const RWSize_T &initialCapacity)
 
 RWBasicUString (const RWUChar16 *source, Duration duration=Transient)
 
 RWBasicUString (const RWUChar16 *source, size_t sourceLength, Duration duration=Transient)
 
 RWBasicUString (const RWUChar16 *source, size_t sourceLength, size_t initialCapacity)
 
 RWBasicUString (const RWUChar32 *source)
 
 RWBasicUString (const RWUChar32 *source, size_t sourceLength)
 
 RWBasicUString (RWBasicUString &&rhs)
 
 RWBasicUString (RWUChar16 *clientBuffer, Deallocator *deallocator)
 
 RWBasicUString (RWUChar16 *clientBuffer, size_t contentLength, Deallocator *deallocator)
 
 RWBasicUString (RWUChar16 *clientBuffer, size_t contentLength, size_t bufferCapacity, Deallocator *deallocator)
 
 RWBasicUString (RWUChar16 codeUnit, size_t repeat=1)
 
 RWBasicUString (RWUChar32 codePoint, size_t repeat=1)
 
 ~RWBasicUString ()
 
RWBasicUStringappend (const RWBasicUString &source)
 
RWBasicUStringappend (const RWBasicUString &source, size_t sourceOffset, size_t sourceLength)
 
RWBasicUStringappend (const RWUChar16 *source)
 
RWBasicUStringappend (const RWUChar16 *source, size_t sourceLength)
 
RWBasicUStringappend (const RWUChar32 *source)
 
RWBasicUStringappend (const RWUChar32 *source, size_t sourceLength)
 
RWBasicUStringappend (RWUChar16 codeUnit, size_t repeat=1)
 
RWBasicUStringappend (RWUChar32 codePoint, size_t repeat=1)
 
iterator begin ()
 
const_iterator begin () const
 
RWspace binaryStoreSize () const
 
size_t boundsCheckIndex (size_t offset) const
 
size_t boundsCheckLength (size_t offset, size_t length) const
 
size_t capacity () const
 
size_t capacity (size_t newCapacity)
 
const_iterator cbegin () const
 
const_iterator cend () const
 
size_t codePointLength () const
 
size_t codeUnitLength () const
 
int compareCodePoints (const RWBasicUString &rhs) const
 
int compareCodePoints (const RWBasicUString &rhs, size_t rhsOffset, size_t rhsLength) const
 
int compareCodePoints (const RWUChar16 *rhs) const
 
int compareCodePoints (const RWUChar16 *rhs, size_t rhsLength) const
 
int compareCodePoints (const RWUChar32 *rhs) const
 
int compareCodePoints (const RWUChar32 *rhs, size_t rhsLength) const
 
int compareCodeUnits (const RWBasicUString &rhs) const
 
int compareCodeUnits (const RWBasicUString &rhs, size_t rhsOffset, size_t rhsLength) const
 
int compareCodeUnits (const RWUChar16 *rhs) const
 
int compareCodeUnits (const RWUChar16 *rhs, size_t rhsLength) const
 
int compareTo (const RWBasicUString &rhs) const
 
int compareTo (const RWBasicUString &rhs, size_t rhsOffset, size_t rhsLength) const
 
int compareTo (const RWUChar16 *rhs) const
 
int compareTo (const RWUChar16 *rhs, size_t rhsLength) const
 
int compareTo (const RWUChar32 *rhs) const
 
int compareTo (const RWUChar32 *rhs, size_t rhsLength) const
 
bool contains (const RWBasicUString &pattern) const
 
bool contains (const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
bool contains (const RWUChar16 *pattern) const
 
bool contains (const RWUChar16 *pattern, size_t patternLength) const
 
bool contains (const RWUChar32 *pattern) const
 
bool contains (const RWUChar32 *pattern, size_t patternLength) const
 
bool contains (RWUChar16 codeUnit) const
 
bool contains (RWUChar32 codePoint) const
 
bool contains (size_t offset, const RWBasicUString &pattern) const
 
bool contains (size_t offset, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
bool contains (size_t offset, const RWUChar16 *pattern) const
 
bool contains (size_t offset, const RWUChar16 *pattern, size_t patternLength) const
 
bool contains (size_t offset, const RWUChar32 *pattern) const
 
bool contains (size_t offset, const RWUChar32 *pattern, size_t patternLength) const
 
bool contains (size_t offset, RWUChar16 codeUnit) const
 
bool contains (size_t offset, RWUChar32 codePoint) const
 
bool contains (size_t offset, size_t length, const RWBasicUString &pattern) const
 
bool contains (size_t offset, size_t length, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
bool contains (size_t offset, size_t length, const RWUChar16 *pattern) const
 
bool contains (size_t offset, size_t length, const RWUChar16 *pattern, size_t patternLength) const
 
bool contains (size_t offset, size_t length, const RWUChar32 *pattern) const
 
bool contains (size_t offset, size_t length, const RWUChar32 *pattern, size_t patternLength) const
 
bool contains (size_t offset, size_t length, RWUChar16 codeUnit) const
 
bool contains (size_t offset, size_t length, RWUChar32 codePoint) const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
const RWUChar16data () const
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
bool equals (const RWBasicUString &array) const
 
size_t first (const RWBasicUString &codeUnitSet) const
 
size_t first (const RWUChar16 *codeUnitSet) const
 
size_t first (const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t first (const RWUChar32 *codePointSet) const
 
size_t first (const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t first (RWUChar16 codeUnit) const
 
size_t first (RWUChar32 codePoint) const
 
size_t first (size_t offset, const RWBasicUString &codeUnitSet) const
 
size_t first (size_t offset, const RWUChar16 *codeUnitSet) const
 
size_t first (size_t offset, const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t first (size_t offset, const RWUChar32 *codePointSet) const
 
size_t first (size_t offset, const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t first (size_t offset, RWUChar16 codeUnit) const
 
size_t first (size_t offset, RWUChar32 codePoint) const
 
size_t first (size_t offset, size_t length, const RWBasicUString &codeUnitSet) const
 
size_t first (size_t offset, size_t length, const RWUChar16 *codeUnitSet) const
 
size_t first (size_t offset, size_t length, const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t first (size_t offset, size_t length, const RWUChar32 *codePointSet) const
 
size_t first (size_t offset, size_t length, const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t first (size_t offset, size_t length, RWUChar16 codeUnit) const
 
size_t first (size_t offset, size_t length, RWUChar32 codePoint) const
 
unsigned long hash () const
 
size_t index (const RWBasicUString &pattern) const
 
size_t index (const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t index (const RWUChar16 *pattern) const
 
size_t index (const RWUChar16 *pattern, size_t patternLength) const
 
size_t index (const RWUChar32 *pattern) const
 
size_t index (const RWUChar32 *pattern, size_t patternLength) const
 
size_t index (RWUChar16 codeUnit) const
 
size_t index (RWUChar32 codePoint) const
 
size_t index (size_t offset, const RWBasicUString &pattern) const
 
size_t index (size_t offset, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t index (size_t offset, const RWUChar16 *pattern) const
 
size_t index (size_t offset, const RWUChar16 *pattern, size_t patternLength) const
 
size_t index (size_t offset, const RWUChar32 *pattern) const
 
size_t index (size_t offset, const RWUChar32 *pattern, size_t patternLength) const
 
size_t index (size_t offset, RWUChar16 codeUnit) const
 
size_t index (size_t offset, RWUChar32 codePoint) const
 
size_t index (size_t offset, size_t length, const RWBasicUString &pattern) const
 
size_t index (size_t offset, size_t length, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t index (size_t offset, size_t length, const RWUChar16 *pattern) const
 
size_t index (size_t offset, size_t length, const RWUChar16 *pattern, size_t patternLength) const
 
size_t index (size_t offset, size_t length, const RWUChar32 *pattern) const
 
size_t index (size_t offset, size_t length, const RWUChar32 *pattern, size_t patternLength) const
 
size_t index (size_t offset, size_t length, RWUChar16 codeUnit) const
 
size_t index (size_t offset, size_t length, RWUChar32 codePoint) const
 
RWBasicUStringinsert (size_t offset, const RWBasicUString &source)
 
RWBasicUStringinsert (size_t offset, const RWBasicUString &source, size_t sourceOffset, size_t sourceLength)
 
RWBasicUStringinsert (size_t offset, const RWUChar16 *source)
 
RWBasicUStringinsert (size_t offset, const RWUChar16 *source, size_t sourceLength)
 
RWBasicUStringinsert (size_t offset, const RWUChar32 *source)
 
RWBasicUStringinsert (size_t offset, const RWUChar32 *source, size_t sourceLength)
 
RWBasicUStringinsert (size_t offset, RWUChar16 codeUnit, size_t repeat=1)
 
RWBasicUStringinsert (size_t offset, RWUChar32 codePoint, size_t repeat=1)
 
bool isNull () const
 
size_t last (const RWBasicUString &codeUnitSet) const
 
size_t last (const RWUChar16 *codeUnitSet) const
 
size_t last (const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t last (const RWUChar32 *codePointSet) const
 
size_t last (const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t last (RWUChar16 codeUnit) const
 
size_t last (RWUChar32 codePoint) const
 
size_t last (size_t offset, const RWBasicUString &codeUnitSet) const
 
size_t last (size_t offset, const RWUChar16 *codeUnitSet) const
 
size_t last (size_t offset, const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t last (size_t offset, const RWUChar32 *codePointSet) const
 
size_t last (size_t offset, const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t last (size_t offset, RWUChar16 codeUnit) const
 
size_t last (size_t offset, RWUChar32 codePoint) const
 
size_t last (size_t offset, size_t length, const RWBasicUString &codeUnitSet) const
 
size_t last (size_t offset, size_t length, const RWUChar16 *codeUnitSet) const
 
size_t last (size_t offset, size_t length, const RWUChar16 *codeUnitSet, size_t numCodeUnits) const
 
size_t last (size_t offset, size_t length, const RWUChar32 *codePointSet) const
 
size_t last (size_t offset, size_t length, const RWUChar32 *codePointSet, size_t numCodePoints) const
 
size_t last (size_t offset, size_t length, RWUChar16 codeUnit) const
 
size_t last (size_t offset, size_t length, RWUChar32 codePoint) const
 
size_t length () const
 
size_t max_size () const
 
 operator const RWUChar16 * () const
 
RWUChar16operator() (size_t offset)
 
RWUChar16 operator() (size_t offset) const
 
RWBasicUStringoperator+= (const RWBasicUString &source)
 
RWBasicUStringoperator+= (const RWUChar16 *source)
 
RWBasicUStringoperator+= (const RWUChar32 *source)
 
RWBasicUStringoperator+= (RWUChar16 codeUnit)
 
RWBasicUStringoperator+= (RWUChar32 codePoint)
 
RWBasicUStringoperator= (const RWBasicUString &source)
 
RWBasicUStringoperator= (const RWUChar16 *source)
 
RWBasicUStringoperator= (const RWUChar32 *source)
 
RWBasicUStringoperator= (RWBasicUString &&rhs)
 
RWBasicUStringoperator= (RWUChar16 codeUnit)
 
RWBasicUStringoperator= (RWUChar32 codePoint)
 
RWUChar16operator[] (int offset)
 
RWUChar16 operator[] (int offset) const
 
RWUChar16operator[] (long long offset)
 
RWUChar16 operator[] (long long offset) const
 
RWUChar16operator[] (long offset)
 
RWUChar16 operator[] (long offset) const
 
RWUChar16operator[] (short offset)
 
RWUChar16 operator[] (short offset) const
 
RWUChar16operator[] (unsigned int offset)
 
RWUChar16 operator[] (unsigned int offset) const
 
RWUChar16operator[] (unsigned long long offset)
 
RWUChar16 operator[] (unsigned long long offset) const
 
RWUChar16operator[] (unsigned long offset)
 
RWUChar16 operator[] (unsigned long offset) const
 
RWUChar16operator[] (unsigned short offset)
 
RWUChar16 operator[] (unsigned short offset) const
 
RWBasicUStringprepend (const RWBasicUString &source)
 
RWBasicUStringprepend (const RWBasicUString &source, size_t sourceOffset, size_t sourceLength)
 
RWBasicUStringprepend (const RWUChar16 *source)
 
RWBasicUStringprepend (const RWUChar16 *source, size_t sourceLength)
 
RWBasicUStringprepend (const RWUChar32 *source)
 
RWBasicUStringprepend (const RWUChar32 *source, size_t sourceLength)
 
RWBasicUStringprepend (RWUChar16 codeUnit, size_t repeat=1)
 
RWBasicUStringprepend (RWUChar32 codePoint, size_t repeat=1)
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
RWBasicUStringremove (size_t offset, size_t length)
 
RWBasicUStringremove (size_t offset=0)
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
RWBasicUStringreplace (size_t offset, size_t length, const RWBasicUString &source)
 
RWBasicUStringreplace (size_t offset, size_t length, const RWBasicUString &source, size_t sourceOffset, size_t sourceLength)
 
RWBasicUStringreplace (size_t offset, size_t length, const RWUChar16 *source)
 
RWBasicUStringreplace (size_t offset, size_t length, const RWUChar16 *source, size_t sourceLength)
 
RWBasicUStringreplace (size_t offset, size_t length, const RWUChar32 *source)
 
RWBasicUStringreplace (size_t offset, size_t length, const RWUChar32 *source, size_t sourceLength)
 
RWBasicUStringreplace (size_t offset, size_t length, RWUChar16 codeUnit, size_t repeat=1)
 
RWBasicUStringreplace (size_t offset, size_t length, RWUChar32 codePoint, size_t repeat=1)
 
void resize (size_t newCodePointLength, RWUChar32 codePoint)
 
void resize (size_t newCodeUnitLength, RWUChar16 codeUnit)
 
void restoreFrom (RWFile &file)
 
void restoreFrom (RWvistream &vis)
 
size_t rindex (const RWBasicUString &pattern) const
 
size_t rindex (const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t rindex (const RWUChar16 *pattern) const
 
size_t rindex (const RWUChar16 *pattern, size_t patternLength) const
 
size_t rindex (const RWUChar32 *pattern) const
 
size_t rindex (const RWUChar32 *pattern, size_t patternLength) const
 
size_t rindex (RWUChar16 codeUnit) const
 
size_t rindex (RWUChar32 codePoint) const
 
size_t rindex (size_t offset, const RWBasicUString &pattern) const
 
size_t rindex (size_t offset, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t rindex (size_t offset, const RWUChar16 *pattern) const
 
size_t rindex (size_t offset, const RWUChar16 *pattern, size_t patternLength) const
 
size_t rindex (size_t offset, const RWUChar32 *pattern) const
 
size_t rindex (size_t offset, const RWUChar32 *pattern, size_t patternLength) const
 
size_t rindex (size_t offset, RWUChar16 codeUnit) const
 
size_t rindex (size_t offset, RWUChar32 codePoint) const
 
size_t rindex (size_t offset, size_t length, const RWBasicUString &pattern) const
 
size_t rindex (size_t offset, size_t length, const RWBasicUString &pattern, size_t patternOffset, size_t patternLength) const
 
size_t rindex (size_t offset, size_t length, const RWUChar16 *pattern) const
 
size_t rindex (size_t offset, size_t length, const RWUChar16 *pattern, size_t patternLength) const
 
size_t rindex (size_t offset, size_t length, const RWUChar32 *pattern) const
 
size_t rindex (size_t offset, size_t length, const RWUChar32 *pattern, size_t patternLength) const
 
size_t rindex (size_t offset, size_t length, RWUChar16 codeUnit) const
 
size_t rindex (size_t offset, size_t length, RWUChar32 codeUnit) const
 
void saveOn (RWFile &file) const
 
void saveOn (RWvostream &vos) const
 
size_t size () const
 
size_t skipLeading (RWUChar32 codePoint=static_cast< RWUChar32 >(0x0020)) const
 
size_t skipTrailing (RWUChar32 codePoint=static_cast< RWUChar32 >(0x0020)) const
 
void swap (RWBasicUString &ustr)
 
std::basic_string< RWUChar32toUtf32 () const
 
RWCString toUtf8 (size_t numCodePoints=RW_NPOS) const
 
RWWString toWide () const
 

Static Public Member Functions

static 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
 

Friends

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

Related Symbols

(Note that these are not member symbols.)

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

  • The initial contents are owned and managed by the client, and the instance assumes no responsibility for deallocating the array. This model is primarily used to treat a static or other long storage-duration array as an RWBasicUString instance. The client array may be treated as read-only storage, or as a writable buffer.
  • The array is allocated by the client, but the RWBasicUString instance is given the responsibility for deallocating the array.
  • The source array is copied by the RWBasicUString instance. The client retains ownership of the source array. The instance owns and manages its own internal copy.

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>
Represents and manages an array of UTF-16 values.
Definition bustring.h:78
Persistence
None

Member Typedef Documentation

◆ const_iterator

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

◆ const_reference

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

◆ const_reverse_iterator

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

◆ difference_type

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

◆ iterator

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

◆ pointer

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

◆ reference

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

◆ reverse_iterator

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.

◆ size_type

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

◆ Duration

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() [1/17]

RWBasicUString::RWBasicUString ( )
inline

Constructs an empty (null) instance.

◆ RWBasicUString() [2/17]

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() [3/17]

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() [4/17]

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() [5/17]

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() [6/17]

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() [7/17]

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() [8/17]

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() [9/17]

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() [10/17]

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() [11/17]

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.

Encapsulates the simple type, size_t.
Definition utility.h:33

◆ RWBasicUString() [12/17]

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

Constructs an RWBasicUString that contains repeat copies of the codeUnit.

◆ RWBasicUString() [13/17]

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() [14/17]

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() [15/17]

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() [16/17]

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() [17/17]

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::~RWBasicUString ( )

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

Member Function Documentation

◆ append() [1/8]

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

Appends the contents of source to the contents of self.

◆ append() [2/8]

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

◆ append() [3/8]

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

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

◆ append() [4/8]

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.

◆ append() [5/8]

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.

◆ append() [6/8]

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.

◆ append() [7/8]

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.

◆ append() [8/8]

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.

◆ begin() [1/2]

RWBasicUString::iterator RWBasicUString::begin ( )
inline

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

◆ begin() [2/2]

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

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

◆ binaryStoreSize()

RWspace RWBasicUString::binaryStoreSize ( ) const

Returns the number of bytes necessary to serialize the object.

◆ boundsCheckIndex()

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

◆ boundsCheckLength()

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

◆ capacity() [1/2]

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.

◆ capacity() [2/2]

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.

◆ cbegin()

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

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

◆ cend()

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

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

◆ codePointLength() [1/4]

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.

◆ codePointLength() [2/4]

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.

◆ codePointLength() [3/4]

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.

◆ codePointLength() [4/4]

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.

◆ codeUnitLength() [1/4]

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.

◆ codeUnitLength() [2/4]

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.

◆ codeUnitLength() [3/4]

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.

◆ codeUnitLength() [4/4]

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.

◆ compareCodePoints() [1/6]

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

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

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

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

◆ compareCodePoints() [2/6]

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

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

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

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

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

◆ compareCodePoints() [3/6]

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

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

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

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

◆ compareCodePoints() [4/6]

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

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

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

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

◆ compareCodePoints() [5/6]

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

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

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

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

◆ compareCodePoints() [6/6]

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.

◆ compareCodeUnits() [1/4]

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

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

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

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

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

◆ compareCodeUnits() [2/4]

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

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

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

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

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

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

◆ compareCodeUnits() [3/4]

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

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

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

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

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

◆ compareCodeUnits() [4/4]

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.

◆ compareTo() [1/6]

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

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

◆ compareTo() [2/6]

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

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

◆ compareTo() [3/6]

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

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

◆ compareTo() [4/6]

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

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

◆ compareTo() [5/6]

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

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

◆ compareTo() [6/6]

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.

◆ computeCodePointValue()

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.

◆ contains() [1/24]

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

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

◆ contains() [2/24]

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

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

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

◆ contains() [3/24]

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

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

◆ contains() [4/24]

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

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

◆ contains() [5/24]

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

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

◆ contains() [6/24]

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

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

◆ contains() [7/24]

bool RWBasicUString::contains ( RWUChar16 codeUnit) const
inline

Returns true if self contains codeUnit, otherwise returns false.

◆ contains() [8/24]

bool RWBasicUString::contains ( RWUChar32 codePoint) const
inline

Returns true if self contains codePoint, otherwise returns false.

◆ contains() [9/24]

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

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

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

◆ contains() [10/24]

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

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

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

◆ contains() [11/24]

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

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

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

◆ contains() [12/24]

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

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

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

◆ contains() [13/24]

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

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

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

◆ contains() [14/24]

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

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

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

◆ contains() [15/24]

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

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

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

◆ contains() [16/24]

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

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

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

◆ contains() [17/24]

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

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

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

◆ contains() [18/24]

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

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

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

◆ contains() [19/24]

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

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

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

◆ contains() [20/24]

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

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

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

◆ contains() [21/24]

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

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

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

◆ contains() [22/24]

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

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

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

◆ contains() [23/24]

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

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

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

◆ contains() [24/24]

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

◆ crbegin()

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.

◆ crend()

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.

◆ data()

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

◆ empty()

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

◆ end() [1/2]

RWBasicUString::iterator RWBasicUString::end ( )
inline

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

◆ end() [2/2]

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

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

◆ equals()

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.

◆ first() [1/21]

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

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

◆ first() [2/21]

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

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

◆ first() [3/21]

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

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

◆ first() [4/21]

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

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

◆ first() [5/21]

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

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

◆ first() [6/21]

size_t RWBasicUString::first ( RWUChar16 codeUnit) const
inline

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

◆ first() [7/21]

size_t RWBasicUString::first ( RWUChar32 codePoint) const
inline

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

◆ first() [8/21]

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

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

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

◆ first() [9/21]

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

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

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

◆ first() [10/21]

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

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

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

◆ first() [11/21]

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

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

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

◆ first() [12/21]

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

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

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

◆ first() [13/21]

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

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

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

◆ first() [14/21]

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

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

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

◆ first() [15/21]

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

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

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

◆ first() [16/21]

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

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

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

◆ first() [17/21]

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

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

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

◆ first() [18/21]

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

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

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

◆ first() [19/21]

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

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

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

◆ first() [20/21]

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

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

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

◆ first() [21/21]

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

◆ getNullDeallocator()

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
RWBasicUString array(buffer, 0, getNullDeallocator());
static Deallocator * getNullDeallocator()

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

◆ hash()

unsigned long RWBasicUString::hash ( ) const

Returns a hash value computed from the contents of self.

◆ highSurrogate()

RWUChar16 RWBasicUString::highSurrogate ( RWUChar32 codePoint)
inlinestatic

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

◆ index() [1/24]

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

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

◆ index() [2/24]

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

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

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

◆ index() [3/24]

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

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

◆ index() [4/24]

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

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

◆ index() [5/24]

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

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

◆ index() [6/24]

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

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

◆ index() [7/24]

size_t RWBasicUString::index ( RWUChar16 codeUnit) const
inline

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

◆ index() [8/24]

size_t RWBasicUString::index ( RWUChar32 codePoint) const
inline

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

◆ index() [9/24]

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

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

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

◆ index() [10/24]

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

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

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

◆ index() [11/24]

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

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

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

◆ index() [12/24]

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

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

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

◆ index() [13/24]

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

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

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

◆ index() [14/24]

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

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

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

◆ index() [15/24]

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

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

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

◆ index() [16/24]

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

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

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

◆ index() [17/24]

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

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

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

◆ index() [18/24]

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

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

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

◆ index() [19/24]

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

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

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

◆ index() [20/24]

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

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

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

◆ index() [21/24]

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

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

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

◆ index() [22/24]

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

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

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

◆ index() [23/24]

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

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

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

◆ index() [24/24]

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

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

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

◆ insert() [1/8]

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

◆ insert() [2/8]

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

◆ insert() [3/8]

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

◆ insert() [4/8]

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

◆ insert() [5/8]

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

◆ insert() [6/8]

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

◆ insert() [7/8]

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

◆ insert() [8/8]

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

◆ isHighSurrogate()

bool RWBasicUString::isHighSurrogate ( RWUChar16 codeUnit)
inlinestatic

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

◆ isLowSurrogate()

bool RWBasicUString::isLowSurrogate ( RWUChar16 codeUnit)
inlinestatic

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

◆ isNull()

bool RWBasicUString::isNull ( ) 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().

◆ isUnicodeCharacter()

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

◆ last() [1/21]

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

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

◆ last() [2/21]

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

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

◆ last() [3/21]

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

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

◆ last() [4/21]

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

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

◆ last() [5/21]

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

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

◆ last() [6/21]

size_t RWBasicUString::last ( RWUChar16 codeUnit) const
inline

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

◆ last() [7/21]

size_t RWBasicUString::last ( RWUChar32 codePoint) const
inline

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

◆ last() [8/21]

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

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

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

◆ last() [9/21]

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

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

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

◆ last() [10/21]

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

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

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

◆ last() [11/21]

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

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

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

◆ last() [12/21]

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

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

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

◆ last() [13/21]

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

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

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

◆ last() [14/21]

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

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

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

◆ last() [15/21]

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

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

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

◆ last() [16/21]

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

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

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

◆ last() [17/21]

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

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

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

◆ last() [18/21]

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

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

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

◆ last() [19/21]

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

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

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

◆ last() [20/21]

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

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

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

◆ last() [21/21]

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

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

◆ lowSurrogate()

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.

◆ max_size()

size_t RWBasicUString::max_size ( ) const
inline

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

◆ operator const RWUChar16 *()

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

◆ operator()() [1/2]

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

◆ operator()() [2/2]

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

◆ operator+=() [1/5]

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

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

◆ operator+=() [2/5]

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.

◆ operator+=() [3/5]

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.

◆ operator+=() [4/5]

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

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

◆ operator+=() [5/5]

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

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

◆ operator=() [1/6]

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

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

◆ operator=() [2/6]

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

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

◆ operator=() [3/6]

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.

◆ operator=() [4/6]

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.

◆ operator=() [5/6]

RWBasicUString & RWBasicUString::operator= ( RWUChar16 codeUnit)

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

◆ operator=() [6/6]

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.

◆ operator[]() [1/16]

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

◆ operator[]() [2/16]

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

◆ operator[]() [3/16]

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

◆ operator[]() [4/16]

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

◆ operator[]() [5/16]

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

◆ operator[]() [6/16]

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

◆ operator[]() [7/16]

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

◆ operator[]() [8/16]

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

◆ operator[]() [9/16]

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

◆ operator[]() [10/16]

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

◆ operator[]() [11/16]

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

◆ operator[]() [12/16]

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

◆ operator[]() [13/16]

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

◆ operator[]() [14/16]

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

◆ operator[]() [15/16]

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

◆ operator[]() [16/16]

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

◆ prepend() [1/8]

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

Prepends the contents of source to the contents of self.

◆ prepend() [2/8]

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

◆ prepend() [3/8]

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

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

◆ prepend() [4/8]

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.

◆ prepend() [5/8]

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.

◆ prepend() [6/8]

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.

◆ prepend() [7/8]

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.

◆ prepend() [8/8]

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.

◆ rbegin() [1/2]

RWBasicUString::reverse_iterator RWBasicUString::rbegin ( )
inline

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

◆ rbegin() [2/2]

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.

◆ remove() [1/2]

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

◆ remove() [2/2]

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

◆ rend() [1/2]

RWBasicUString::reverse_iterator RWBasicUString::rend ( )
inline

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

◆ rend() [2/2]

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.

◆ replace() [1/8]

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

◆ replace() [2/8]

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

◆ replace() [3/8]

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

◆ replace() [4/8]

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

◆ replace() [5/8]

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

◆ replace() [6/8]

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

◆ replace() [7/8]

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

◆ replace() [8/8]

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

◆ requiresSurrogatePair()

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.

◆ resize() [1/2]

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.

◆ resize() [2/2]

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.

◆ restoreFrom() [1/2]

void RWBasicUString::restoreFrom ( RWFile & file)

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

◆ restoreFrom() [2/2]

void RWBasicUString::restoreFrom ( RWvistream & vis)

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

◆ rindex() [1/24]

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

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

◆ rindex() [2/24]

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

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

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

◆ rindex() [3/24]

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

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

◆ rindex() [4/24]

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

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

◆ rindex() [5/24]

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

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

◆ rindex() [6/24]

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

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

◆ rindex() [7/24]

size_t RWBasicUString::rindex ( RWUChar16 codeUnit) const
inline

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

◆ rindex() [8/24]

size_t RWBasicUString::rindex ( RWUChar32 codePoint) const
inline

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

◆ rindex() [9/24]

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

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

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

◆ rindex() [10/24]

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

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

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

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

◆ rindex() [11/24]

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

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

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

◆ rindex() [12/24]

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

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

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

◆ rindex() [13/24]

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

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

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

◆ rindex() [14/24]

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

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

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

◆ rindex() [15/24]

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

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

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

◆ rindex() [16/24]

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

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

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

◆ rindex() [17/24]

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

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

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

◆ rindex() [18/24]

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

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

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

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

◆ rindex() [19/24]

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

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

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

◆ rindex() [20/24]

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

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

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

◆ rindex() [21/24]

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

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

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

◆ rindex() [22/24]

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

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

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

◆ rindex() [23/24]

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

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

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

◆ rindex() [24/24]

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

◆ saveOn() [1/2]

void RWBasicUString::saveOn ( RWFile & file) const

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

◆ saveOn() [2/2]

void RWBasicUString::saveOn ( RWvostream & vos) const

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

◆ size()

size_t RWBasicUString::size ( ) const
inline

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

◆ skipLeading()

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.

◆ skipTrailing()

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.

◆ swap()

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.

◆ toUtf32()

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.

◆ toUtf8()

RWCString RWBasicUString::toUtf8 ( size_t numCodePoints = RW_NPOS) const

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

◆ toWide()

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.

◆ USE_DELETE()

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.

◆ USE_FREE()

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.

◆ USE_NONE()

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.

◆ validateCodePoint()

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);
static RWUChar32 validateCodePoint(RWUChar32 codePoint)
unspecified_32bit_type RWUChar32
Definition uchar.h:91
Exceptions
RWConversionErrThrown if codePoint is not a valid Unicode character.

Friends And Related Symbol Documentation

◆ operator!=() [1/5]

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

◆ operator!=() [2/5]

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

◆ operator!=() [3/5]

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

◆ operator!=() [4/5]

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

◆ operator!=() [5/5]

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

◆ operator<() [1/5]

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.

◆ operator<() [2/5]

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.

◆ operator<() [3/5]

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.

◆ operator<() [4/5]

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.

◆ operator<() [5/5]

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.

◆ operator<<() [1/3]

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.

◆ operator<<() [2/3]

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.

◆ operator<<() [3/3]

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.

◆ operator<=() [1/5]

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.

◆ operator<=() [2/5]

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.

◆ operator<=() [3/5]

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.

◆ operator<=() [4/5]

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.

◆ operator<=() [5/5]

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.

◆ operator==() [1/5]

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.

◆ operator==() [2/5]

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.

◆ operator==() [3/5]

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.

◆ operator==() [4/5]

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.

◆ operator==() [5/5]

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.

◆ operator>() [1/5]

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.

◆ operator>() [2/5]

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.

◆ operator>() [3/5]

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.

◆ operator>() [4/5]

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.

◆ operator>() [5/5]

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.

◆ operator>=() [1/5]

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.

◆ operator>=() [2/5]

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.

◆ operator>=() [3/5]

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.

◆ operator>=() [4/5]

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.

◆ operator>=() [5/5]

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.

◆ operator>>() [1/5]

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.

◆ operator>>() [2/5]

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.

◆ operator>>() [3/5]

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.

◆ operator>>() [4/5]

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.

◆ operator>> [5/5]

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.

Member Data Documentation

◆ DefaultFillCharacter

const RWUChar32 RWBasicUString::DefaultFillCharacter
static

A static constant representing the Unicode space character.

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