UnicodeString is a concrete implementation of the abstract class UnicodeText
UnicodeString is a concrete implementation of the abstract class UnicodeText. UnicodeString performs codeset conversion from char* data based on the type of data specified.
inline bool_t operator!= (const UnicodeString& text) const
inline bool_t operator> (const UnicodeString& text) const
inline bool_t operator< (const UnicodeString& text) const
inline bool_t operator>= (const UnicodeString& text) const
inline bool_t operator<= (const UnicodeString& text) const
inline int8_t compare(const UnicodeString& text) const
inline int8_t compare(UTextOffset start, int32_t length, const UnicodeString& srcText) const
length - the number of characters of text to compare.
srcText - the text to be compared
inline int8_t compare(UTextOffset start, int32_t length, const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength) const
length - the number of characters in this to compare.
srcText - the text to be compared
srcStart - the offset into srcText to start comparison
srcLength - the number of characters in src to compare
inline int8_t compare(const UChar *srcChars, int32_t srcLength) const
srcLength - the number of characters in srcChars to compare
inline int8_t compare(UTextOffset start, int32_t length, const UChar *srcChars) const
length - the number of characters to compare.
srcChars - the characters to be compared
inline int8_t compare(UTextOffset start, int32_t length, const UChar *srcChars, UTextOffset srcStart, int32_t srcLength) const
length - the number of characters in this to compare
srcChars - the characters to be compared
srcStart - the offset into srcChars to start comparison
srcLength - the number of characters in srcChars to compare
inline int8_t compareBetween(UTextOffset start, UTextOffset limit, const UnicodeString& srcText, UTextOffset srcStart, UTextOffset srcLimit) const
limit - the offset immediately following the compare operation
srcText - the text to be compared
srcStart - the offset into srcText to start comparison
srcLimit - the offset into srcText to limit comparison
inline bool_t startsWith(const UnicodeString& text) const
inline bool_t startsWith(const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength) const
srcStart - the offset into srcText to start matching
srcLength - the number of characters in srcText to match
inline bool_t startsWith(const UChar *srcChars, int32_t srcLength) const
srcLength - the number of characters in srcChars
inline bool_t startsWith(const UChar *srcChars, UTextOffset srcStart, int32_t srcLength) const
srcStart - the offset into srcText to start matching
srcLength - the number of characters in srcChars to match
inline bool_t endsWith(const UnicodeString& text) const
inline bool_t endsWith(const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength) const
srcStart - the offset into srcText to start matching
srcLength - the number of characters in srcText to match
inline bool_t endsWith(const UChar *srcChars, int32_t srcLength) const
srcLength - the number of characters in srcChars
inline bool_t endsWith(const UChar *srcChars, UTextOffset srcStart, int32_t srcLength) const
srcStart - the offset into srcText to start matching
srcLength - the number of characters in srcChars to match
inline UTextOffset indexOf(const UnicodeString& text) const
inline UTextOffset indexOf(const UnicodeString& text, UTextOffset start) const
start - The offset at which searching will start.
inline UTextOffset indexOf(const UnicodeString& text, UTextOffset start, int32_t length) const
start - The offset at which searching will start.
length - The number of characters to search
inline UTextOffset indexOf(const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength, UTextOffset start, int32_t length) const
srcStart - the offset into srcText at which
to start matching
srcLength - the number of characters in srcText to match
start - the offset into this at which to start matching
length - the number of characters in this to search
inline UTextOffset indexOf(const UChar *srcChars, int32_t srcLength, UTextOffset start) const
srcLength - the number of characters in srcChars to match
start - the offset into this at which to start matching
inline UTextOffset indexOf(const UChar *srcChars, int32_t srcLength, UTextOffset start, int32_t length) const
srcLength - the number of characters in srcChars
start - The offset at which searching will start.
length - The number of characters to search
inline UTextOffset indexOf(const UChar *srcChars, UTextOffset srcStart, int32_t srcLength, UTextOffset start, int32_t length) const
srcStart - the offset into srcChars at which
to start matching
srcLength - the number of characters in srcChars to match
start - the offset into this at which to start matching
length - the number of characters in this to search
inline UTextOffset indexOf(UChar c) const
inline UTextOffset indexOf(UChar c, UTextOffset start) const
start - The offset at which searching will start.
inline UTextOffset indexOf(UChar c, UTextOffset start, int32_t length) const
start - the offset into this at which to start matching
length - the number of characters in this to search
inline UTextOffset lastIndexOf(const UnicodeString& text) const
inline UTextOffset lastIndexOf(const UnicodeString& text, UTextOffset start) const
start - The offset at which searching will start.
inline UTextOffset lastIndexOf(const UnicodeString& text, UTextOffset start, int32_t length) const
start - The offset at which searching will start.
length - The number of characters to search
inline UTextOffset lastIndexOf(const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength, UTextOffset start, int32_t length) const
srcStart - the offset into srcText at which
to start matching
srcLength - the number of characters in srcText to match
start - the offset into this at which to start matching
length - the number of characters in this to search
inline UTextOffset lastIndexOf(const UChar *srcChars, int32_t srcLength, UTextOffset start) const
srcLength - the number of characters in srcChars to match
start - the offset into this at which to start matching
inline UTextOffset lastIndexOf(const UChar *srcChars, int32_t srcLength, UTextOffset start, int32_t length) const
srcLength - the number of characters in srcChars
start - The offset at which searching will start.
length - The number of characters to search
inline UTextOffset lastIndexOf(const UChar *srcChars, UTextOffset srcStart, int32_t srcLength, UTextOffset start, int32_t length) const
srcStart - the offset into srcChars at which
to start matching
srcLength - the number of characters in srcChars to match
start - the offset into this at which to start matching
length - the number of characters in this to search
inline UTextOffset lastIndexOf(UChar c) const
inline UTextOffset lastIndexOf(UChar c, UTextOffset start) const
start - The offset at which searching will start.
inline UTextOffset lastIndexOf(UChar c, UTextOffset start, int32_t length) const
start - the offset into this at which to start matching
length - the number of characters in this to search
inline UChar charAt(UTextOffset offset) const
inline UChar operator [] (UTextOffset offset) const
inline void extract(UTextOffset start, int32_t length, UChar *dst, UTextOffset dstStart = 0) const
length - the number of characters to extract
dst - array in which to copy characters. The length of dst
must be at least (dstStart + length).
dstStart - the offset in dst where the first character
will be extracted inline void extract(UTextOffset start, int32_t length, UnicodeString& target) const
length - the number of characters to extract
target - UnicodeString into which to copy characters.
inline void extractBetween(UTextOffset start, UTextOffset limit, UChar *dst, UTextOffset dstStart = 0) const
limit - offset immediately following the last character to be copied
dst - array in which to copy characters. The length of dst
must be at least (dstStart + (limit - start)).
dstStart - the offset in dst where the first character
will be extracted inline void extractBetween(UTextOffset start, UTextOffset limit, UnicodeString& target) const
limit - offset immediately following the last character to be copied
target - UnicodeString into which to copy characters.
int32_t extract(UTextOffset start, int32_t length, char *dst, const char *codepage = 0) const
length - the number of characters to extract
target - the target buffer for extraction
codepage - the desired codepage for the characters. 0 has
the special meaning of the default codepage
inline int32_t length(void) const
inline bool_t empty(void) const
inline int32_t hashCode(void) const
inline bool_t isBogus(void) const
UnicodeString& operator= (const UnicodeString& srcText)
inline UnicodeString& operator= (UChar ch)
inline UnicodeString& setTo(const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength)
srcStart - the offset into srcText where new characters
will be obtained
srcLength - the number of characters in srcText in the
replace string.
inline UnicodeString& setTo(const UnicodeString& srcText)
inline UnicodeString& setTo(const UChar *srcChars, UTextOffset srcStart, int32_t srcLength)
srcStart - the offset into srcChars where new characters
will be obtained
srcLength - the number of characters in srcChars in the
replace string
inline UnicodeString& setTo(const UChar *srcChars, int32_t srcLength)
srcLength - the number of Unicode characters in srcChars.
UnicodeString& setTo(UChar srcChar)
UnicodeString& setCharAt(UTextOffset offset, UChar ch)
ch - The new character
inline UnicodeString& operator+= (UChar ch)
inline UnicodeString& operator+= (const UnicodeString& srcText)
inline UnicodeString& append(const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength)
srcStart - the offset into srcText where new characters
will be obtained
srcLength - the number of characters in srcText in
the append string
inline UnicodeString& append(const UnicodeString& srcText)
inline UnicodeString& append(const UChar *srcChars, UTextOffset srcStart, int32_t srcLength)
srcStart - the offset into srcChars where new characters
will be obtained
srcLength - the number of characters in srcChars in
the append string
inline UnicodeString& append(const UChar *srcChars, int32_t srcLength)
srcLength - the number of Unicode characters in srcChars
inline UnicodeString& append(UChar srcChar)
inline UnicodeString& insert(UTextOffset start, const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength)
srcText - the source for the new characters
srcStart - the offset into srcText where new characters
will be obtained
srcLength - the number of characters in srcText in
the insert string
inline UnicodeString& insert(UTextOffset start, const UnicodeString& srcText)
srcText - the source for the new characters
inline UnicodeString& insert(UTextOffset start, const UChar *srcChars, UTextOffset srcStart, int32_t srcLength)
srcChars - the source for the new characters
srcStart - the offset into srcChars where new characters
will be obtained
srcLength - the number of characters in srcChars
in the insert string
inline UnicodeString& insert(UTextOffset start, const UChar *srcChars, int32_t srcLength)
srcChars - the source for the new characters
srcLength - the number of Unicode characters in srcChars.
inline UnicodeString& insert(UTextOffset start, UChar srcChar)
srcChar - the character to insert
UnicodeString& replace(UTextOffset start, int32_t length, const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength)
length - the number of characters to replace. The character at
start + length is not modified.
srcText - the source for the new characters
srcStart - the offset into srcText where new characters
will be obtained
srcLength - the number of characters in srcText in
the replace string
UnicodeString& replace(UTextOffset start, int32_t length, const UnicodeString& srcText)
length - the number of characters to replace. The character at
start + length is not modified.
srcText - the source for the new characters
UnicodeString& replace(UTextOffset start, int32_t length, const UChar *srcChars, UTextOffset srcStart, int32_t srcLength)
length - the number of characters to replace. The character at
start + length is not modified.
srcChars - the source for the new characters
srcStart - the offset into srcChars where new characters
will be obtained
srcLength - the number of characters in srcChars
in the replace string
inline UnicodeString& replace(UTextOffset start, int32_t length, const UChar *srcChars, int32_t srcLength)
length - number of characters to replace. The character at
start + length is not modified.
srcChars - the source for the new characters
srcLength - the number of Unicode characters in srcChars
inline UnicodeString& replace(UTextOffset start, int32_t length, UChar srcChar)
length - the number of characters to replace. The character at
start + length is not modified.
srcChar - the new character
inline UnicodeString& replaceBetween(UTextOffset start, UTextOffset limit, const UnicodeString& srcText)
limit - the offset immediately following the replace range
srcText - the source for the new characters
inline UnicodeString& replaceBetween(UTextOffset start, UTextOffset limit, const UnicodeString& srcText, UTextOffset srcStart, UTextOffset srcLimit)
limit - the offset immediately following the replace range
srcText - the source for the new characters
srcStart - the offset into srcChars where new characters
will be obtained
srcLimit - the offset immediately following the range to copy
in srcText
inline UnicodeString& findAndReplace(const UnicodeString& oldText, const UnicodeString& newText)
newText - the text containing the replacement text
inline UnicodeString& findAndReplace(UTextOffset start, int32_t length, const UnicodeString& oldText, const UnicodeString& newText)
length - the length of the range in which replace will be performed
oldText - the text containing the search text
newText - the text containing the replacement text
inline UnicodeString& findAndReplace(UTextOffset start, int32_t length, const UnicodeString& oldText, UTextOffset oldStart, int32_t oldLength, const UnicodeString& newText, UTextOffset newStart, int32_t newLength)
length - the length of the range in which replace will be performed
oldText - the text containing the search text
oldStart - the start of the search range in oldText
oldLength - the length of the search range in oldText
newText - the text containing the replacement text
newStart - the start of the replacement range in newText
newLength - the length of the replacement range in newText
inline UnicodeString& remove(void)