Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide

RWBasicUString

Module:  Essential Tools Module   Group:  Internationalization


Does not inherit

Local Index

Members

Non-Members

Synopsis

#include <rw/tools/bustring.h>
RWBasicUString b;

Description

RWBasicUString is used to manage an array of RWUChar16 values. An instance of RWBasicUString may be constructed to use one of three memory management models:

When deallocation responsibility is passed from the client to an RWBasicUString, the client must supply a function object, or functor, that can be used to deallocate the storage. This mechanism allows the client to choose to use delete[], 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().

Persistence

None

Global Typedefs

typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef RWUChar16 value_type;
typedef RWUChar16* pointer;
typedef RWUChar16& reference;
typedef const RWUChar16& const_reference;
typedef const RWUChar16* iterator;
typedef const RWUChar16* const_iterator;

Enumerators

enum Duration { Transient, Persistent}

Constructors

RWBasicUString();
RWBasicUString(const RWBasicUString& source);
RWBasicUString(const RWUChar16* source, Duration duration = Transient);
RWBasicUString(const RWUChar16* source, size_t sourceLength, Duration duration = Transient);
RWBasicUString(const RWUChar16* source, size_t souceLength, size_t initialCapacity);
RWBasicUString(RWUChar16* clientBuffer, Deallocator* deallocator);
RWBasicUString(RWUChar16* clientBuffer, size_t contentLength, Deallocator* deallocator);
RWBasicUString(RWUChar16* clientBuffer, size_t contentLength, size_t bufferCapacity, Deallocator* deallocator);
RWBasicUString(const RWUChar32* source);
RWBasicUString(const RWUChar32* source, size_t sourceLength);
RWBasicUString(const RWSize_T& initialCapacity);
RWBasicUString(RWUChar16 codeUnit, size_t repeat = 1);
RWBasicUString(RWUChar32 codePoint, size_t repeat = 1);
RWBasicUString(const char* utf8Source);
RWBasicUString(const char* utf8Source, size_t length);
RWBasicUString(const RWCString& utf8Source);

Destructors

~RWBasicUString();

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 Deallocator* 
getNullDeallocator();
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);

Public Member Functions

RWBasicUString&
append(const RWBasicUString& source);
RWBasicUString&
append(const RWBasicUString& source, size_t sourceOffset, size_t sourceLength);
RWBasicUString&
append(const RWUChar16* source);
RWBasicUString&
append(const RWUChar16* source, size_t sourceLength);
RWBasicUString&
append(const RWUChar32* source);
RWBasicUString&
append(const RWUChar32* source, size_t sourceLength);
RWBasicUString&
append(RWUChar16 codeUnit, size_t repeat = 1);
RWBasicUString&
append(RWUChar32 codePoint, size_t repeat = 1);
const_iterator
begin() 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);
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 RWUChar16*
data() const;
bool
empty() const;
const_iterator
end() 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;
bool
equals(const RWBasicUString& array) 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 codeUnit) 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 codeUnit) const;
RWBasicUString&
insert(size_t offset, const RWBasicUString& source);
RWBasicUString&
insert(size_t offset, const RWBasicUString& source, size_t sourceOffset, size_t sourceLength);
RWBasicUString&
insert(size_t offset, const RWUChar16* source);
RWBasicUString&
insert(size_t offset, const RWUChar16* source, size_t sourceLength);
RWBasicUString&
insert(size_t offset, const RWUChar32* source);
RWBasicUString&
insert(size_t offset, const RWUChar32* source, size_t sourceLength);
RWBasicUString&
insert(size_t offset, RWUChar16 codeUnit, size_t repeat = 1);
RWBasicUString&
insert(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;
RWBasicUString&
operator=(const RWBasicUString& source);
RWBasicUString&
operator=(const RWUChar16* source);
RWBasicUString&
operator=(const RWUChar32* source);
RWBasicUString&
operator=(RWUChar16 codeUnit);
RWBasicUString&
operator=(RWUChar32 codePoint);
RWBasicUString&
operator+=(const RWBasicUString& source);
RWBasicUString&
operator+=(const RWUChar16* source);
RWBasicUString&
operator+=(const RWUChar32* source);
RWBasicUString&
operator+=(RWUChar16 codeUnit);
RWBasicUString&
operator+=(RWUChar32 codePoint);
RWUChar16&
operator[](short offset);
RWUChar16&
operator[](int offset);
RWUChar16&
operator[](long offset);
RWUChar16&
operator[](unsigned short offset);
RWUChar16&
operator[](unsigned int offset);
RWUChar16&
operator[](unsigned long offset);
RWUChar16&
operator[](rwlonglong offset);
RWUChar16&
operator[](rwulonglong offset);
RWUChar16
operator[](short offset) const;
RWUChar16
operator[](int offset) const;
RWUChar16
operator[](long offset) const;
RWUChar16
operator[](unsigned short offset) const;
RWUChar16
operator[](unsigned int offset) const;
RWUChar16
operator[](unsigned long offset) const;
RWUChar16
operator[](rwlonglong offset) const;
RWUChar16
operator[](rwulonglong offset) const;
RWUChar16&
operator()(size_t offset);
RWUChar16
operator()(size_t offset) const;
operator const
RWUChar16*() const;
RWBasicUString&
prepend(const RWBasicUString& source);
RWBasicUString&
prepend(const RWBasicUString& source, size_t sourceOffset, size_t sourceLength);
RWBasicUString&
prepend(const RWUChar16* source);
RWBasicUString&
prepend(const RWUChar16* source, size_t sourceLength);
RWBasicUString&
prepend(const RWUChar32* source);
RWBasicUString&
prepend(const RWUChar32* source, size_t sourceLength);
RWBasicUString&
prepend(RWUChar16 codeUnit, size_t repeat = 1);
RWBasicUString&
prepend(RWUChar32 codePoint, size_t repeat = 1);
RWBasicUString&
remove(size_t offset = 0);
RWBasicUString&
remove(size_t offset, size_t length);
RWBasicUString&
replace(size_t offset, size_t length, const RWBasicUString& source);
RWBasicUString&
replace(size_t offset, size_t length, const RWBasicUString& source, size_t sourceOffset, size_t sourceLength);
RWBasicUString&
replace(size_t offset, size_t length, const RWUChar16* source);
RWBasicUString&
replace(size_t offset, size_t length, const RWUChar16* source, size_t sourceLength);
RWBasicUString&
replace(size_t offset, size_t length, const RWUChar32* source);
RWBasicUString&
replace(size_t offset, size_t length, const RWUChar32* source, size_t sourceLength);
RWBasicUString&
replace(size_t offset, size_t length, RWUChar16 codeUnit, size_t repeat = 1);
RWBasicUString&
replace(size_t offset, size_t length, RWUChar32 codePoint, size_t repeat = 1);
void
resize(size_t newCodeUnitLength, RWUChar16 codeUnit);
void
resize(size_t newCodePointLength, RWUChar32 codePoint);
void
restoreFrom(RWvistream& vis);
void
restoreFrom(RWFile& file);
size_t
rindex(const RWBasicUString& pattern) const;
size_t
rindex(const RWBasicUString& pattern, size_t patternOffset, size_t patternLength) const;
size_t
rindex(const RWUChar16* pattern) const;
size_t
rindex(const RWUChar16* pattern, size_t patternLength) const;
size_t
rindex(const RWUChar32* pattern) const;
size_t
rindex(const RWUChar32* pattern, size_t patternLength) const;
size_t
rindex(RWUChar16 codeUnit) const;
size_t
rindex(RWUChar32 codePoint) const;
size_t
rindex(size_t offset, const RWBasicUString& pattern) const;
size_t
rindex(size_t offset, const RWBasicUString& pattern, size_t patternOffset, size_t patternLength) const;
size_t
rindex(size_t offset, const RWUChar16* pattern) const;
size_t
rindex(size_t offset, const RWUChar16* pattern, size_t patternLength) const;
size_t
rindex(size_t offset, const RWUChar32* pattern) const;
size_t
rindex(size_t offset, const RWUChar32* pattern, size_t patternLength) const;
size_t
rindex(size_t offset, RWUChar16 codeUnit) const;
size_t
rindex(size_t offset, RWUChar32 codeUnit) const;
size_t
rindex(size_t offset, size_t length, const RWBasicUString& pattern) const;
size_t
rindex(size_t offset, size_t length, const RWBasicUString& pattern, size_t patternOffset, size_t patternLength) const;
size_t
rindex(size_t offset, size_t length, const RWUChar16* pattern) const;
size_t
rindex(size_t offset, size_t length, const RWUChar16* pattern, size_t patternLength) const;
size_t
rindex(size_t offset, size_t length, const RWUChar32* pattern) const;
size_t
rindex(size_t offset, size_t length, const RWUChar32* pattern, size_t patternLength) const;
size_t
rindex(size_t offset, size_t length, RWUChar16 codeUnit) const;
size_t
rindex(size_t offset, size_t length, RWUChar32 codeUnit) const;
void
saveOn(RWvostream& vos) const;
void
saveOn(RWFile& file) const;
size_t
skipLeading(RWUChar32 codePoint =
                    static_cast<RWUChar32>('0x0020')) const;
size_t
skipTrailing(RWUChar32 codePoint = 
                     static_cast<RWUChar32>('0x0020')) const;
size_t
size() const;
void
swap(RWBasicUString& ustr);
RW_SL_STD(basic_string<RWUChar32>)
toUtf32() const;
RWCString
toUtf8(size_t numCodePoints = RW_NPOS) const;
RWWString
toWide() const;

Related Global Operators

bool
operator<(const RWUChar16* lhs, const RWBasicUString& rhs)
bool
operator<(const RWBasicUString& lhs, const RWUChar16* rhs)
bool
operator<(const RWBasicUString& lhs, const RWBasicUString& rhs)
bool
operator<(const RWUChar32* lhs, const RWBasicUString& rhs)
bool
operator<(const RWBasicUString& lhs, const RWUChar32* rhs)
ostream&
operator<<( RW_SL_IO_STD(ostream&) os, const RWBasicUString& ustr);
RWFile&
operator<<(RWFile& file, const RWBasicUString& ustr);
RWbostream&
operator<<(RWbostream& bos, const RWBasicUString& ustr);
RWpostream&
operator<<(RWpostream& pos, const RWBasicUString& ustr);
RWeostream&
operator<<(RWeostream& eos, const RWBasicUString& ustr);
RWXDRostream&
operator<<(RWXDRostream& xos, const RWBasicUString& ustr);
bool
operator<=(const RWUChar16* lhs, const RWBasicUString& rhs)
bool
operator<=(const RWBasicUString& lhs, const RWUChar16* rhs)
bool
operator<=(const RWBasicUString& lhs, const RWBasicUString& rhs)
bool
operator<=(const RWUChar32* lhs, const RWBasicUString& rhs)
bool
operator<=(const RWBasicUString& lhs, const RWUChar32* rhs)
bool
operator==(const RWUChar16* lhs, const RWBasicUString& rhs)
bool
operator==(const RWBasicUString& lhs, const RWUChar16* rhs)
bool
operator==(const RWBasicUString& lhs, const RWBasicUString& rhs)
bool
operator==(const RWUChar32* lhs, const RWBasicUString& rhs)
bool
operator==(const RWBasicUString& lhs, const RWUChar32* rhs)
bool
operator!=(const RWUChar16* lhs, const RWBasicUString& rhs)
bool
operator!=(const RWBasicUString& lhs, const RWUChar16* rhs)
bool
operator!=(const RWBasicUString& lhs, const RWBasicUString& rhs)
bool
operator!=(const RWUChar32* lhs, const RWBasicUString& rhs)
bool
operator!=(const RWBasicUString& lhs, const RWUChar32* rhs)
bool
operator>=(const RWUChar16* lhs, const RWBasicUString& rhs)
bool
operator>=(const RWBasicUString& lhs, const RWUChar16* rhs)
bool
operator>=(const RWBasicUString& lhs, const RWBasicUString& rhs)
bool
operator>=(const RWUChar32* lhs, const RWBasicUString& rhs)
bool
operator>=(const RWBasicUString& lhs, const RWUChar32* rhs)
bool
operator>(const RWUChar16* lhs, const RWBasicUString& rhs)
bool
operator>(const RWBasicUString& lhs, const RWUChar16* rhs)
bool
operator>(const RWBasicUString& lhs, const RWBasicUString& rhs)
bool
operator>(const RWUChar32* lhs, const RWBasicUString& rhs)
bool
operator>(const RWBasicUString& lhs, const RWUChar32* rhs)
istream&
operator>>(RW_SL_IO_STD(istream&) os, RWBasicUString& ustr);
RWFile&
operator>>(RWFile& file, RWBasicUString& ustr);
RWFile&
operator>>(RWFile& file, RWBasicUString*& ustrp);
RWvistream&
operator>>(RWvistream& vis, RWBasicUString& ustr);
RWvistream&
operator>>(RWvistream& vis, RWBasicUString*& ustrp);
RWbistream&
operator>>(RWbistream& bis, RWBasicUString& ustr);
RWpistream&
operator>>(RWpistream& pis, RWBasicUString& ustr);
RWeistream&
operator>>(RWeistream& eis, RWBasicUString& ustr);
RWbistream&
operator>>(RWbistream& bis, RWBasicUString*& ustrp);
RWpistream&
operator>>(RWpistream& pis, RWBasicUString*& ustrp);
RWeistream&
operator>>(RWeistream& eis, RWBasicUString*& ustrp);
RWXDRistream&
operator>>(RWXDRistream& xis, RWBasicUString& ustr);
RWXDRistream&
operator>>(RWXDRistream& xis, RWBasicUString*& ustrp);

Class Deallocator

Description

Deallocator acts as an abstract base class for subclasses that release client-allocated storage.

Deallocator objects are required because RWBasicUString cannot assume that local invocation of methods such as delete[] or free() manipulate the same heap as that of the client, as might be the case when an application contains some libraries that use debug versions of heap management routines while others do not.

A Deallocator subclass must override both doDeallocation() methods to avoid the ambiguities produced should the subclass declaration "hide" one of the superclass declarations of these functions.

Constructor

Deallocator();

Destructor

virtual
~Deallocator();

Protected Member Functions

void
deallocate(RWUChar16* p);
void
deallocate(RWUChar16* p) const;
virtual void
doDeallocate(RWUChar16* p);
virtual void
doDeallocate(RWUChar16* p) const = 0;

Class StaticDeallocator

Description

StaticDeallocator forwards deallocation requests to a simple, client-defined, static callback method of the form:

Constructor

StaticDeallocator(void (*deallocator)(RWUChar16*), bool destroyAfterDeallocate = false);

Destructor

virtual
~StaticDeallocator();

Protected Member Functions

virtual void
doDeallocate(RWUChar16* p);
virtual void
doDeallocate(RWUChar16* p) const;

Class Pad

Description

Defines an iostream manipulator that can be used to insert the contents of ustr into the output stream os, padding that string with the specified fill character codePoint until os.width() code points have been written to the stream. If the length of ustr is greater than os.width(), the string is truncated and no padding occurs. If os.width() is zero, the entire contents of the string are inserted into the stream and no padding occurs.

A Pad instance is only valid as long as the source string remains unchanged. Do not create persistent instances of this class; it should only be instantiated as a temporary in an insertion expression.

Constructor

Pad(const RWBasicUString& ustr, RWUChar32 codePoint =
     RWBasicUString::DefaultFillCharacter); 

Public Member Data

const RWUChar16* data_;
size_t length_; 
RWUChar32 codePoint_;


Previous fileTop of DocumentContentsIndex pageNext file

©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.