#include <unistr.h>
Class diagram for UnicodeString:
Public Members | |||
![]() | ![]() | bool_t | operator== (const UnicodeString& text) const |
![]() | ![]() | Equality operator. More... | |
![]() | ![]() | bool_t | operator!= (const UnicodeString& text) const |
![]() | ![]() | Inequality operator. More... | |
![]() | ![]() | bool_t | operator> (const UnicodeString& text) const |
![]() | ![]() | Greater than operator. More... | |
![]() | ![]() | bool_t | operator< (const UnicodeString& text) const |
![]() | ![]() | Less than operator. More... | |
![]() | ![]() | bool_t | operator>= (const UnicodeString& text) const |
![]() | ![]() | Greater than or equal operator. More... | |
![]() | ![]() | bool_t | operator<= (const UnicodeString& text) const |
![]() | ![]() | Less than or equal operator. More... | |
![]() | ![]() | int8_t | compare (const UnicodeString& text) const |
![]() | ![]() | Compare the characters bitwise in this UnicodeString to the characters in text . More... | |
![]() | ![]() | int8_t | compare (UTextOffset start, int32_t length, const UnicodeString& srcText) const |
![]() | ![]() | Compare the characters bitwise in the range [start , start + length ) with the characters in srcText . More... | |
![]() | ![]() | int8_t | compare (UTextOffset start, int32_t length, const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength) const |
![]() | ![]() | Compare the characters bitwise in the range [start , start + length ) with the characters in srcText in the range [srcStart , srcStart + srcLength ). More... | |
![]() | ![]() | int8_t | compare (const UChar *srcChars, int32_t srcLength) const |
![]() | ![]() | Compare the characters bitwise in this UnicodeString with the first srcLength characters in srcChars . More... | |
![]() | ![]() | int8_t | compare (UTextOffset start, int32_t length, const UChar *srcChars) const |
![]() | ![]() | Compare the characters bitwise in the range [start , start + length ) with the first length characters in srcChars . More... | |
![]() | ![]() | int8_t | compare (UTextOffset start, int32_t length, const UChar *srcChars, UTextOffset srcStart, int32_t srcLength) const |
![]() | ![]() | Compare the characters bitwise in the range [start , start + length ) with the characters in srcChars in the range [srcStart , srcStart + srcLength ). More... | |
![]() | ![]() | int8_t | compareBetween (UTextOffset start, UTextOffset limit, const UnicodeString& srcText, UTextOffset srcStart, UTextOffset srcLimit) const |
![]() | ![]() | Compare the characters bitwise in the range [start , limit ) with the characters in srcText in the range [srcStart , srcLimit ). More... | |
![]() | ![]() | bool_t | startsWith (const UnicodeString& text) const |
![]() | ![]() | Determine if this starts with the characters in text . More... | |
![]() | ![]() | bool_t | startsWith (const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength) const |
![]() | ![]() | Determine if this starts with the characters in srcText in the range [srcStart , srcStart + srcLength ). More... | |
![]() | ![]() | bool_t | startsWith (const UChar *srcChars, int32_t srcLength) const |
![]() | ![]() | Determine if this starts with the characters in srcChars . More... | |
![]() | ![]() | bool_t | startsWith (const UChar *srcChars, UTextOffset srcStart, int32_t srcLength) const |
![]() | ![]() | Determine if this ends with the characters in srcChars in the range [srcStart , srcStart + srcLength ). More... | |
![]() | ![]() | bool_t | endsWith (const UnicodeString& text) const |
![]() | ![]() | Determine if this ends with the characters in text . More... | |
![]() | ![]() | bool_t | endsWith (const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength) const |
![]() | ![]() | Determine if this ends with the characters in srcText in the range [srcStart , srcStart + srcLength ). More... | |
![]() | ![]() | bool_t | endsWith (const UChar *srcChars, int32_t srcLength) const |
![]() | ![]() | Determine if this ends with the characters in srcChars . More... | |
![]() | ![]() | bool_t | endsWith (const UChar *srcChars, UTextOffset srcStart, int32_t srcLength) const |
![]() | ![]() | Determine if this ends with the characters in srcChars in the range [srcStart , srcStart + srcLength ). More... | |
![]() | ![]() | UTextOffset | indexOf (const UnicodeString& text) const |
![]() | ![]() | Locate in this the first occurrence of the characters in text , using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | indexOf (const UnicodeString& text, UTextOffset start) const |
![]() | ![]() | Locate in this the first occurrence of the characters in text starting at offset start , using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | indexOf (const UnicodeString& text, UTextOffset start, int32_t length) const |
![]() | ![]() | Locate in this the first occurrence in the range [start , start + length ) of the characters in text , using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | indexOf (const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength, UTextOffset start, int32_t length) const |
![]() | ![]() | Locate in this the first occurrence in the range [start , start + length ) of the characters in srcText in the range [srcStart , srcStart + srcLength ), using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | indexOf (const UChar *srcChars, int32_t srcLength, UTextOffset start) const |
![]() | ![]() | Locate in this the first occurrence of the characters in srcChars starting at offset start , using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | indexOf (const UChar *srcChars, int32_t srcLength, UTextOffset start, int32_t length) const |
![]() | ![]() | Locate in this the first occurrence in the range [start , start + length ) of the characters in srcChars , using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | indexOf (const UChar *srcChars, UTextOffset srcStart, int32_t srcLength, UTextOffset start, int32_t length) const |
![]() | ![]() | Locate in this the first occurrence in the range [start , start + length ) of the characters in srcChars in the range [srcStart , srcStart + srcLength ), using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | indexOf (UChar c) const |
![]() | ![]() | Locate in this the first occurrence of the character c , using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | indexOf (UChar c, UTextOffset start) const |
![]() | ![]() | Locate in this the first occurrence of the character c starting at offset start , using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | indexOf (UChar c, UTextOffset start, int32_t length) const |
![]() | ![]() | Locate in this the first occurrence of the character c in the range [start , start + length ), using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | lastIndexOf (const UnicodeString& text) const |
![]() | ![]() | Locate in this the last occurrence of the characters in text , using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | lastIndexOf (const UnicodeString& text, UTextOffset start) const |
![]() | ![]() | Locate in this the last occurrence of the characters in text starting at offset start , using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | lastIndexOf (const UnicodeString& text, UTextOffset start, int32_t length) const |
![]() | ![]() | Locate in this the last occurrence in the range [start , start + length ) of the characters in text , using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | lastIndexOf (const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength, UTextOffset start, int32_t length) const |
![]() | ![]() | Locate in this the last occurrence in the range [start , start + length ) of the characters in srcText in the range [srcStart , srcStart + srcLength ), using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | lastIndexOf (const UChar *srcChars, int32_t srcLength, UTextOffset start) const |
![]() | ![]() | Locate in this the last occurrence of the characters in srcChars starting at offset start , using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | lastIndexOf (const UChar *srcChars, int32_t srcLength, UTextOffset start, int32_t length) const |
![]() | ![]() | Locate in this the last occurrence in the range [start , start + length ) of the characters in srcChars , using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | lastIndexOf (const UChar *srcChars, UTextOffset srcStart, int32_t srcLength, UTextOffset start, int32_t length) const |
![]() | ![]() | Locate in this the last occurrence in the range [start , start + length ) of the characters in srcChars in the range [srcStart , srcStart + srcLength ), using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | lastIndexOf (UChar c) const |
![]() | ![]() | Locate in this the last occurrence of the character c , using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | lastIndexOf (UChar c, UTextOffset start) const |
![]() | ![]() | Locate in this the last occurrence of the character c starting at offset start , using bitwise comparison. More... | |
![]() | ![]() | UTextOffset | lastIndexOf (UChar c, UTextOffset start, int32_t length) const |
![]() | ![]() | Locate in this the last occurrence of the character c in the range [start , start + length ), using bitwise comparison. More... | |
![]() | ![]() | UChar | charAt (UTextOffset offset) const |
![]() | ![]() | Return the character at offset offset . More... | |
![]() | ![]() | UChar | operator[] (UTextOffset offset) const |
![]() | ![]() | Return the character at offset offset . More... | |
![]() | ![]() | void | extract (UTextOffset start, int32_t length, UChar *dst, UTextOffset dstStart = 0) const |
![]() | ![]() | Copy the characters in the range [start , start + length ) into the array dst , beginning at dstStart . More... | |
![]() | ![]() | void | extract (UTextOffset start, int32_t length, UnicodeString& target) const |
![]() | ![]() | Copy the characters in the range [start , start + length ) into the UnicodeString target . More... | |
![]() | ![]() | void | extractBetween (UTextOffset start, UTextOffset limit, UChar *dst, UTextOffset dstStart = 0) const |
![]() | ![]() | Copy the characters in the range [start , limit ) into the array dst , beginning at dstStart . More... | |
![]() | ![]() | void | extractBetween (UTextOffset start, UTextOffset limit, UnicodeString& target) const |
![]() | ![]() | Copy the characters in the range [start , limit ) into the UnicodeString target . More... | |
![]() | ![]() | int32_t | extract (UTextOffset start, int32_t length, char *dst, const char *codepage = 0) const |
![]() | ![]() | Copy the characters in the range [start , start + length ) into an array of characters in a specified codepage. More... | |
![]() | ![]() | int32_t | length (void) const |
![]() | ![]() | Return the length of the UnicodeString object. More... | |
![]() | ![]() | bool_t | empty (void) const |
![]() | ![]() | Determine if this string is empty. More... | |
![]() | ![]() | int32_t | hashCode (void) const |
![]() | ![]() | Generate a hash code for this object. More... | |
![]() | ![]() | bool_t | isBogus (void) const |
![]() | ![]() | Determine if this string is still valid. More... | |
![]() | ![]() | UnicodeString& | operator= (const UnicodeString& srcText) |
![]() | ![]() | Assignment operator. More... | |
![]() | ![]() | UnicodeString& | operator= (UChar ch) |
![]() | ![]() | Assignment operator. More... | |
![]() | ![]() | UnicodeString& | setTo (const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength) |
![]() | ![]() | Set the text in the UnicodeString object to the characters in srcText in the range [srcStart , srcStart + srcLength ). More... | |
![]() | ![]() | UnicodeString& | setTo (const UnicodeString& srcText) |
![]() | ![]() | Set the text in the UnicodeString object to the characters in srcText . More... | |
![]() | ![]() | UnicodeString& | setTo (const UChar *srcChars, UTextOffset srcStart, int32_t srcLength) |
![]() | ![]() | Set the characters in the UnicodeString object to the characters in srcChars in the range [srcStart , srcStart + srcLength ). More... | |
![]() | ![]() | UnicodeString& | setTo (const UChar *srcChars, int32_t srcLength) |
![]() | ![]() | Set the characters in the UnicodeString object to the characters in srcChars . More... | |
![]() | ![]() | UnicodeString& | setTo (UChar srcChar) |
![]() | ![]() | Set the characters in the UnicodeString object to the character srcChar . More... | |
![]() | ![]() | UnicodeString& | setCharAt (UTextOffset offset, UChar ch) |
![]() | ![]() | Set the character at the specified offset to the specified character. More... | |
![]() | ![]() | UnicodeString& | operator+= (UChar ch) |
![]() | ![]() | Append operator. More... | |
![]() | ![]() | UnicodeString& | operator+= (const UnicodeString& srcText) |
![]() | ![]() | Append operator. More... | |
![]() | ![]() | UnicodeString& | append (const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength) |
![]() | ![]() | Append the characters in srcText in the range [srcStart , srcStart + srcLength ) to the UnicodeString object at offset start . More... | |
![]() | ![]() | UnicodeString& | append (const UnicodeString& srcText) |
![]() | ![]() | Append the characters in srcText to the UnicodeString object at offset start . More... | |
![]() | ![]() | UnicodeString& | append (const UChar *srcChars, UTextOffset srcStart, int32_t srcLength) |
![]() | ![]() | Append the characters in srcChars in the range [srcStart , srcStart + srcLength ) to the UnicodeString object at offset start . More... | |
![]() | ![]() | UnicodeString& | append (const UChar *srcChars, int32_t srcLength) |
![]() | ![]() | Append the characters in srcChars to the UnicodeString object at offset start . More... | |
![]() | ![]() | UnicodeString& | append (UChar srcChar) |
![]() | ![]() | Append the character srcChar to the UnicodeString object. More... | |
![]() | ![]() | UnicodeString& | insert (UTextOffset start, const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength) |
![]() | ![]() | Insert the characters in srcText in the range [srcStart , srcStart + srcLength ) into the UnicodeString object at offset start . More... | |
![]() | ![]() | UnicodeString& | insert (UTextOffset start, const UnicodeString& srcText) |
![]() | ![]() | Insert the characters in srcText into the UnicodeString object at offset start . More... | |
![]() | ![]() | UnicodeString& | insert (UTextOffset start, const UChar *srcChars, UTextOffset srcStart, int32_t srcLength) |
![]() | ![]() | Insert the characters in srcChars in the range [srcStart , srcStart + srcLength ) into the UnicodeString object at offset start . More... | |
![]() | ![]() | UnicodeString& | insert (UTextOffset start, const UChar *srcChars, int32_t srcLength) |
![]() | ![]() | Insert the characters in srcChars into the UnicodeString object at offset start . More... | |
![]() | ![]() | UnicodeString& | insert (UTextOffset start, UChar srcChar) |
![]() | ![]() | Insert the character srcChar into the UnicodeString object at offset start . More... | |
![]() | ![]() | UnicodeString& | replace (UTextOffset start, int32_t length, const UnicodeString& srcText, UTextOffset srcStart, int32_t srcLength) |
![]() | ![]() | Replace the characters in the range [start , start + length ) with the characters in srcText in the range [srcStart , srcStart + srcLength ). More... | |
![]() | ![]() | UnicodeString& | replace (UTextOffset start, int32_t length, const UnicodeString& srcText) |
![]() | ![]() | Replace the characters in the range [start , start + length ) with the characters in srcText . More... | |
![]() | ![]() | UnicodeString& | replace (UTextOffset start, int32_t length, const UChar *srcChars, UTextOffset srcStart, int32_t srcLength) |
![]() | ![]() | Replace the characters in the range [start , start + length ) with the characters in srcChars in the range [srcStart , srcStart + srcLength ). More... | |
![]() | ![]() | UnicodeString& | replace (UTextOffset start, int32_t length, const UChar *srcChars, int32_t srcLength) |
![]() | ![]() | Replace the characters in the range [start , start + length ) with the characters in srcChars . More... | |
![]() | ![]() | UnicodeString& | replace (UTextOffset start, int32_t length, UChar srcChar) |
![]() | ![]() | Replace the characters in the range [start , start + length ) with the character srcChar . More... | |
![]() | ![]() | UnicodeString& | replaceBetween (UTextOffset start, UTextOffset limit, const UnicodeString& srcText) |
![]() | ![]() | Replace the characters in the range [start , limit ) with the characters in srcText . More... | |
![]() | ![]() | UnicodeString& | replaceBetween (UTextOffset start, UTextOffset limit, const UnicodeString& srcText, UTextOffset srcStart, UTextOffset srcLimit) |
![]() | ![]() | Replace the characters in the range [start , limit ) with the characters in srcText in the range [srcStart , srcLimit ). More... | |
![]() | ![]() | virtual void | handleReplaceBetween (UTextOffset start, UTextOffset limit, const UnicodeString& text) |
![]() | ![]() | Replace a substring of this object with the given text. More... | |
![]() | ![]() | UnicodeString& | findAndReplace (const UnicodeString& oldText, const UnicodeString& newText) |
![]() | ![]() | Replace all occurrences of characters in oldText with the characters in newText. More... | |
![]() | ![]() | UnicodeString& | findAndReplace (UTextOffset start, int32_t length, const UnicodeString& oldText, const UnicodeString& newText) |
![]() | ![]() | Replace all occurrences of characters in oldText with characters in newText in the range [start , start + length ). More... | |
![]() | ![]() | UnicodeString& | findAndReplace (UTextOffset start, int32_t length, const UnicodeString& oldText, UTextOffset oldStart, int32_t oldLength, const UnicodeString& newText, UTextOffset newStart, int32_t newLength) |
![]() | ![]() | Replace all occurrences of characters in oldText in the range [oldStart , oldStart + oldLength ) with the characters in newText in the range [newStart , newStart + newLength ) in the range [start , start + length ). More... | |
![]() | ![]() | UnicodeString& | remove (void) |
![]() | ![]() | Remove all characters from the UnicodeString object. More... | |
![]() | ![]() | UnicodeString& | remove (UTextOffset start, int32_t length = LONG_MAX) |
![]() | ![]() | Remove the characters in the range [start , start + length ) from the UnicodeString object. More... | |
![]() | ![]() | UnicodeString& | removeBetween (UTextOffset start, UTextOffset limit = LONG_MAX) |
![]() | ![]() | Remove the characters in the range [start , limit ) from the UnicodeString object. More... | |
![]() | ![]() | bool_t | padLeading (int32_t targetLength, UChar padChar = 0x0020) |
![]() | ![]() | Pad the start of this UnicodeString with the character padChar . More... | |
![]() | ![]() | bool_t | padTrailing (int32_t targetLength, UChar padChar = 0x0020) |
![]() | ![]() | Pad the end of this UnicodeString with the character padChar . More... | |
![]() | ![]() | bool_t | truncate (int32_t targetLength) |
![]() | ![]() | Truncate this UnicodeString to the targetLength . More... | |
![]() | ![]() | UnicodeString& | trim (void) |
![]() | ![]() | Trims leading and trailing whitespace from this UnicodeString. More... | |
![]() | ![]() | UnicodeString& | reverse (void) |
![]() | ![]() | Reverse this UnicodeString in place. More... | |
![]() | ![]() | UnicodeString& | reverse (UTextOffset start, int32_t length) |
![]() | ![]() | Reverse the range [start , start + length ) in this UnicodeString. More... | |
![]() | ![]() | UnicodeString& | toUpper (void) |
![]() | ![]() | Convert the characters in this to UPPER CASE following the conventions of the default locale. More... | |
![]() | ![]() | UnicodeString& | toUpper (const Locale& locale) |
![]() | ![]() | Convert the characters in this to UPPER CASE following the conventions of a specific locale. More... | |
![]() | ![]() | UnicodeString& | toLower (void) |
![]() | ![]() | Convert the characters in this to UPPER CASE following the conventions of the default. More... | |
![]() | ![]() | UnicodeString& | toLower (const Locale& locale) |
![]() | ![]() | Convert the characters in this to UPPER CASE following the conventions of a specific locale. More... | |
![]() | ![]() | UnicodeString () | |
![]() | ![]() | Construct an empty UnicodeString. More... | |
![]() | ![]() | UnicodeString (int32_t capacity) | |
![]() | ![]() | Construct a UnicodeString with capacity to hold capacity UChars. More... | |
![]() | ![]() | UnicodeString (UChar ch) | |
![]() | ![]() | Single UChar constructor. More... | |
![]() | ![]() | UnicodeString (const UChar *text) | |
![]() | ![]() | UChar* constructor. More... | |
![]() | ![]() | UnicodeString (const UChar *text, int32_t textLength) | |
![]() | ![]() | UChar* constructor. More... | |
![]() | ![]() | UnicodeString (bool_t isTerminated, UChar *text, int32_t textLength) | |
![]() | ![]() | Aliasing UChar* constructor. More... | |
![]() | ![]() | UnicodeString (const char *codepageData, const char *codepage = 0) | |
![]() | ![]() | char* constructor. More... | |
![]() | ![]() | UnicodeString (const char *codepageData, int32_t dataLength, const char *codepage = 0) | |
![]() | ![]() | char* constructor. More... | |
![]() | ![]() | UnicodeString (const UnicodeString& that) | |
![]() | ![]() | Copy constructor. More... | |
![]() | ![]() | ~UnicodeString () | |
![]() | ![]() | Destructor. More... | |
![]() | ![]() | int32_t | numDisplayCells (UTextOffset start = 0, int32_t length = LONG_MAX, bool_t asian = TRUE) const |
![]() | ![]() | Returns the number of display cells occupied by the range [start , length ). More... | |
![]() | ![]() | UCharReference | operator[] (UTextOffset pos) |
![]() | ![]() | int32_t | size (void) const |
![]() | ![]() | UnicodeString& | findAndReplace (const UnicodeString& oldText, const UnicodeString& newText, UTextOffset start, int32_t length) |
![]() | ![]() | void* | operator new (size_t size) |
![]() | ![]() | void* | operator new (size_t size, void *location) |
![]() | ![]() | void | operator delete (void *location) |
![]() | ![]() | UnicodeString (UChar *buff, int32_t bufLength, int32_t buffCapacity) | |
![]() | ![]() | const UChar* | getUChars (void) const |
![]() | ![]() | const UChar* | getUniChars (void) const |
![]() | ![]() | UChar* | orphanStorage (void) |
Friends | |||
![]() | ![]() | class | UnicodeStringStreamer |
UnicodeString performs codeset conversion from char* data based on the type of data specified.
bool_t UnicodeString::operator== (const UnicodeString & text) const [inline]
|
Equality operator.
Performs only bitwise comparison.
text | The UnicodeString to compare to this one. |
text
contains the same characters as this one, FALSE otherwise.
bool_t UnicodeString::operator!= (const UnicodeString & text) const [inline]
|
Inequality operator.
Performs only bitwise comparison.
text | The UnicodeString to compare to this one. |
text
contains the same characters as this one, TRUE otherwise.
bool_t UnicodeString::operator> (const UnicodeString & text) const [inline]
|
Greater than operator.
Performs only bitwise comparison.
text | The UnicodeString to compare to this one. |
text
are bitwise greater than the characters in this, FALSE otherwise
bool_t UnicodeString::operator< (const UnicodeString & text) const [inline]
|
Less than operator.
Performs only bitwise comparison.
text | The UnicodeString to compare to this one. |
text
are bitwise less than the characters in this, FALSE otherwise
bool_t UnicodeString::operator>= (const UnicodeString & text) const [inline]
|
Greater than or equal operator.
Performs only bitwise comparison.
text | The UnicodeString to compare to this one. |
text
are bitwise greater than or equal to the characters in this, FALSE otherwise
bool_t UnicodeString::operator<= (const UnicodeString & text) const [inline]
|
Less than or equal operator.
Performs only bitwise comparison.
text | The UnicodeString to compare to this one. |
text
are bitwise less than or equal to the characters in this, FALSE otherwise
int8_t UnicodeString::compare (const UnicodeString & text) const [inline]
|
Compare the characters bitwise in this UnicodeString to the characters in text
.
text | The UnicodeString to compare to this one. |
text
contains the same characters as this, -1 if the characters in text
are bitwise less than the characters in this, +1 if the characters in text
are bitwise greater than the characters in this.
int8_t UnicodeString::compare (UTextOffset start, int32_t length, const UnicodeString & srcText) const [inline]
|
Compare the characters bitwise in the range [start
, start + length
) with the characters in srcText
.
start | the offset at which the compare operation begins |
length | the number of characters of text to compare. |
srcText | the text to be compared |
text
contains the same characters as this, -1 if the characters in text
are bitwise less than the characters in this, +1 if the characters in text
are bitwise greater than the characters in this.
int8_t UnicodeString::compare (UTextOffset start, int32_t length, const UnicodeString & srcText, UTextOffset srcStart, int32_t srcLength) const [inline]
|
Compare the characters bitwise in the range [start
, start + length
) with the characters in srcText
in the range [srcStart
, srcStart + srcLength
).
start | the offset at which the compare operation begins |
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 |
text
contains the same characters as this, -1 if the characters in text
are bitwise less than the characters in this, +1 if the characters in text
are bitwise greater than the characters in this.
int8_t UnicodeString::compare (const UChar * srcChars, int32_t srcLength) const [inline]
|
Compare the characters bitwise in this UnicodeString with the first srcLength
characters in srcChars
.
srcChars | The characters to compare to this UnicodeString. |
srcLength |
the number of characters in srcChars to compare |
text
contains the same characters as this, -1 if the characters in text
are bitwise less than the characters in this, +1 if the characters in text
are bitwise greater than the characters in this.
int8_t UnicodeString::compare (UTextOffset start, int32_t length, const UChar * srcChars) const [inline]
|
Compare the characters bitwise in the range [start
, start + length
) with the first length
characters in srcChars
.
start | the offset at which the compare operation begins |
length | the number of characters to compare. |
srcChars | the characters to be compared |
text
contains the same characters as this, -1 if the characters in text
are bitwise less than the characters in this, +1 if the characters in text
are bitwise greater than the characters in this.
int8_t UnicodeString::compare (UTextOffset start, int32_t length, const UChar * srcChars, UTextOffset srcStart, int32_t srcLength) const [inline]
|
Compare the characters bitwise in the range [start
, start + length
) with the characters in srcChars
in the range [srcStart
, srcStart + srcLength
).
start | the offset at which the compare operation begins |
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 |
text
contains the same characters as this, -1 if the characters in text
are bitwise less than the characters in this, +1 if the characters in text
are bitwise greater than the characters in this.
int8_t UnicodeString::compareBetween (UTextOffset start, UTextOffset limit, const UnicodeString & srcText, UTextOffset srcStart, UTextOffset srcLimit) const [inline]
|
Compare the characters bitwise in the range [start
, limit
) with the characters in srcText
in the range [srcStart
, srcLimit
).
start | the offset at which the compare operation begins |
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 |
text
contains the same characters as this, -1 if the characters in text
are bitwise less than the characters in this, +1 if the characters in text
are bitwise greater than the characters in this.
bool_t UnicodeString::startsWith (const UnicodeString & text) const [inline]
|
Determine if this starts with the characters in text
.
text | The text to match. |
text
, FALSE otherwise
bool_t UnicodeString::startsWith (const UnicodeString & srcText, UTextOffset srcStart, int32_t srcLength) const [inline]
|
Determine if this starts with the characters in srcText
in the range [srcStart
, srcStart + srcLength
).
srcText | The text to match. |
srcStart |
the offset into srcText to start matching |
srcLength |
the number of characters in srcText to match |
text
, FALSE otherwise
bool_t UnicodeString::startsWith (const UChar * srcChars, int32_t srcLength) const [inline]
|
Determine if this starts with the characters in srcChars
.
srcChars | The characters to match. |
srcLength |
the number of characters in srcChars |
srcChars
, FALSE otherwise
bool_t UnicodeString::startsWith (const UChar * srcChars, UTextOffset srcStart, int32_t srcLength) const [inline]
|
Determine if this ends with the characters in srcChars
in the range [srcStart
, srcStart + srcLength
).
srcChars | The characters to match. |
srcStart |
the offset into srcText to start matching |
srcLength |
the number of characters in srcChars to match |
srcChars
, FALSE otherwise
bool_t UnicodeString::endsWith (const UnicodeString & text) const [inline]
|
Determine if this ends with the characters in text
.
text | The text to match. |
text
, FALSE otherwise
bool_t UnicodeString::endsWith (const UnicodeString & srcText, UTextOffset srcStart, int32_t srcLength) const [inline]
|
Determine if this ends with the characters in srcText
in the range [srcStart
, srcStart + srcLength
).
srcText | The text to match. |
srcStart |
the offset into srcText to start matching |
srcLength |
the number of characters in srcText to match |
text
, FALSE otherwise
bool_t UnicodeString::endsWith (const UChar * srcChars, int32_t srcLength) const [inline]
|
Determine if this ends with the characters in srcChars
.
srcChars | The characters to match. |
srcLength |
the number of characters in srcChars |
srcChars
, FALSE otherwise
bool_t UnicodeString::endsWith (const UChar * srcChars, UTextOffset srcStart, int32_t srcLength) const [inline]
|
Determine if this ends with the characters in srcChars
in the range [srcStart
, srcStart + srcLength
).
srcChars | The characters to match. |
srcStart |
the offset into srcText to start matching |
srcLength |
the number of characters in srcChars to match |
srcChars
, FALSE otherwise
UTextOffset UnicodeString::indexOf (const UnicodeString & text) const [inline]
|
Locate in this the first occurrence of the characters in text
, using bitwise comparison.
text | The text to search for. |
text
, or -1 if not found.
UTextOffset UnicodeString::indexOf (const UnicodeString & text, UTextOffset start) const [inline]
|
Locate in this the first occurrence of the characters in text
starting at offset start
, using bitwise comparison.
text | The text to search for. |
start | The offset at which searching will start. |
text
, or -1 if not found.
UTextOffset UnicodeString::indexOf (const UnicodeString & text, UTextOffset start, int32_t length) const [inline]
|
Locate in this the first occurrence in the range [start
, start + length
) of the characters in text
, using bitwise comparison.
text | The text to search for. |
start | The offset at which searching will start. |
length | The number of characters to search |
text
, or -1 if not found.
UTextOffset UnicodeString::indexOf (const UnicodeString & srcText, UTextOffset srcStart, int32_t srcLength, UTextOffset start, int32_t length) const [inline]
|
Locate in this the first occurrence in the range [start
, start + length
) of the characters in srcText
in the range [srcStart
, srcStart + srcLength
), using bitwise comparison.
text | The text to search for. |
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 |
text
, or -1 if not found.
UTextOffset UnicodeString::indexOf (const UChar * srcChars, int32_t srcLength, UTextOffset start) const [inline]
|
Locate in this the first occurrence of the characters in srcChars
starting at offset start
, using bitwise comparison.
srcChars | The text to search for. |
srcLength |
the number of characters in srcChars to match |
start | the offset into this at which to start matching |
text
, or -1 if not found.
UTextOffset UnicodeString::indexOf (const UChar * srcChars, int32_t srcLength, UTextOffset start, int32_t length) const [inline]
|
Locate in this the first occurrence in the range [start
, start + length
) of the characters in srcChars
, using bitwise comparison.
text | The text to search for. |
srcLength |
the number of characters in srcChars |
start | The offset at which searching will start. |
length | The number of characters to search |
srcChars
, or -1 if not found. UTextOffset UnicodeString::indexOf (const UChar * srcChars, UTextOffset srcStart, int32_t srcLength, UTextOffset start, int32_t length) const |
Locate in this the first occurrence in the range [start
, start + length
) of the characters in srcChars
in the range [srcStart
, srcStart + srcLength
), using bitwise comparison.
srcChars | The text to search for. |
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 |
text
, or -1 if not found.
UTextOffset UnicodeString::indexOf (UChar c) const [inline]
|
Locate in this the first occurrence of the character c
, using bitwise comparison.
c | The character to search for. |
c
, or -1 if not found.
UTextOffset UnicodeString::indexOf (UChar c, UTextOffset start) const [inline]
|
Locate in this the first occurrence of the character c
starting at offset start
, using bitwise comparison.
c | The character to search for. |
start | The offset at which searching will start. |
c
, or -1 if not found.
UTextOffset UnicodeString::indexOf (UChar c, UTextOffset start, int32_t length) const [inline]
|
Locate in this the first occurrence of the character c
in the range [start
, start + length
), using bitwise comparison.
c | The character to search for. |
start | the offset into this at which to start matching |
length | the number of characters in this to search |
c
, or -1 if not found.
UTextOffset UnicodeString::lastIndexOf (const UnicodeString & text) const [inline]
|
Locate in this the last occurrence of the characters in text
, using bitwise comparison.
text | The text to search for. |
text
, or -1 if not found.
UTextOffset UnicodeString::lastIndexOf (const UnicodeString & text, UTextOffset start) const [inline]
|
Locate in this the last occurrence of the characters in text
starting at offset start
, using bitwise comparison.
text | The text to search for. |
start | The offset at which searching will start. |
text
, or -1 if not found.
UTextOffset UnicodeString::lastIndexOf (const UnicodeString & text, UTextOffset start, int32_t length) const [inline]
|
Locate in this the last occurrence in the range [start
, start + length
) of the characters in text
, using bitwise comparison.
text | The text to search for. |
start | The offset at which searching will start. |
length | The number of characters to search |
text
, or -1 if not found.
UTextOffset UnicodeString::lastIndexOf (const UnicodeString & srcText, UTextOffset srcStart, int32_t srcLength, UTextOffset start, int32_t length) const [inline]
|
Locate in this the last occurrence in the range [start
, start + length
) of the characters in srcText
in the range [srcStart
, srcStart + srcLength
), using bitwise comparison.
text | The text to search for. |
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 |
text
, or -1 if not found.
UTextOffset UnicodeString::lastIndexOf (const UChar * srcChars, int32_t srcLength, UTextOffset start) const [inline]
|
Locate in this the last occurrence of the characters in srcChars
starting at offset start
, using bitwise comparison.
srcChars | The text to search for. |
srcLength |
the number of characters in srcChars to match |
start | the offset into this at which to start matching |
text
, or -1 if not found.
UTextOffset UnicodeString::lastIndexOf (const UChar * srcChars, int32_t srcLength, UTextOffset start, int32_t length) const [inline]
|
Locate in this the last occurrence in the range [start
, start + length
) of the characters in srcChars
, using bitwise comparison.
text | The text to search for. |
srcLength |
the number of characters in srcChars |
start | The offset at which searching will start. |
length | The number of characters to search |
srcChars
, or -1 if not found. UTextOffset UnicodeString::lastIndexOf (const UChar * srcChars, UTextOffset srcStart, int32_t srcLength, UTextOffset start, int32_t length) const |
Locate in this the last occurrence in the range [start
, start + length
) of the characters in srcChars
in the range [srcStart
, srcStart + srcLength
), using bitwise comparison.
srcChars | The text to search for. |
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 |
text
, or -1 if not found.
UTextOffset UnicodeString::lastIndexOf (UChar c) const [inline]
|
Locate in this the last occurrence of the character c
, using bitwise comparison.
c | The character to search for. |
c
, or -1 if not found.
UTextOffset UnicodeString::lastIndexOf (UChar c, UTextOffset start) const [inline]
|
Locate in this the last occurrence of the character c
starting at offset start
, using bitwise comparison.
c | The character to search for. |
start | The offset at which searching will start. |
c
, or -1 if not found.
UTextOffset UnicodeString::lastIndexOf (UChar c, UTextOffset start, int32_t length) const [inline]
|
Locate in this the last occurrence of the character c
in the range [start
, start + length
), using bitwise comparison.
c | The character to search for. |
start | the offset into this at which to start matching |
length | the number of characters in this to search |
c
, or -1 if not found.
UChar UnicodeString::charAt (UTextOffset offset) const [inline, virtual]
|
Return the character at offset offset
.
offset | a valid offset into the text |
offset
Reimplemented from Replaceable.
UChar UnicodeString::operator[] (UTextOffset offset) const [inline]
|
Return the character at offset offset
.
offset | a valid offset into the text |
offset
void UnicodeString::extract (UTextOffset start, int32_t length, UChar * dst, UTextOffset dstStart = 0) const [inline]
|
Copy the characters in the range [start
, start + length
) into the array dst
, beginning at dstStart
.
start | offset of first character which will be copied into the array |
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 |
void UnicodeString::extract (UTextOffset start, int32_t length, UnicodeString & target) const [inline]
|
Copy the characters in the range [start
, start + length
) into the UnicodeString target
.
start | offset of first character which will be copied |
length | the number of characters to extract |
target | UnicodeString into which to copy characters. |
target
void UnicodeString::extractBetween (UTextOffset start, UTextOffset limit, UChar * dst, UTextOffset dstStart = 0) const [inline, virtual]
|
Copy the characters in the range [start
, limit
) into the array dst
, beginning at dstStart
.
start | offset of first character which will be copied into the array |
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 |
Reimplemented from Replaceable.
void UnicodeString::extractBetween (UTextOffset start, UTextOffset limit, UnicodeString & target) const [inline]
|
Copy the characters in the range [start
, limit
) into the UnicodeString target
.
start | offset of first character which will be copied |
limit | offset immediately following the last character to be copied |
target | UnicodeString into which to copy characters. |
target
void UnicodeString::extract (UTextOffset start, int32_t length, char * dst, const char * codepage = 0) const [inline]
|
Copy the characters in the range [start
, start + length
) into an array of characters in a specified codepage.
start | offset of first character which will be copied |
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 If codepage is an empty string ("" ), then a simple conversion is performed on the codepage-invariant subset ("invariant characters") of the platform encoding. See utypes.h. |
dst
int32_t UnicodeString::length (void) const [inline, virtual]
|
Return the length of the UnicodeString object.
The length is the number of characters in the text.
Reimplemented from Replaceable.
bool_t UnicodeString::empty (void) const [inline]
|
Determine if this string is empty.
int32_t UnicodeString::hashCode (void) const [inline]
|
Generate a hash code for this object.
bool_t UnicodeString::isBogus (void) const [inline]
|
Determine if this string is still valid.
UnicodeString & UnicodeString::operator= (const UnicodeString & srcText) |
Assignment operator.
Replace the characters in this UnicodeString with the characters from srcText
.
srcText | The text containing the characters to replace |
UnicodeString & UnicodeString::operator= (UChar ch) [inline]
|
Assignment operator.
Replace the characters in this UnicodeString with the character ch
.
ch | the character to replace |
UnicodeString & UnicodeString::setTo (const UnicodeString & srcText, UTextOffset srcStart, int32_t srcLength) [inline]
|
Set the text in the UnicodeString object to the characters in srcText
in the range [srcStart
, srcStart + srcLength
).
srcText
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 & UnicodeString::setTo (const UnicodeString & srcText) [inline]
|
Set the text in the UnicodeString object to the characters in srcText
.
srcText
is not modified.
srcText | the source for the new characters |
UnicodeString & UnicodeString::setTo (const UChar * srcChars, UTextOffset srcStart, int32_t srcLength) [inline]
|
Set the characters in the UnicodeString object to the characters in srcChars
in the range [srcStart
, srcStart + srcLength
).
srcChars
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 |
UnicodeString & UnicodeString::setTo (const UChar * srcChars, int32_t srcLength) [inline]
|
Set the characters in the UnicodeString object to the characters in srcChars
.
srcChars
is not modified.
srcChars | the source for the new characters |
srcLength | the number of Unicode characters in srcChars. |
UnicodeString & UnicodeString::setTo (UChar srcChar) [inline]
|
Set the characters in the UnicodeString object to the character srcChar
.
srcChar | the character which becomes the UnicodeString's character content |
UnicodeString & UnicodeString::setCharAt (UTextOffset offset, UChar ch) |
Set the character at the specified offset to the specified character.
offset | A valid offset into the text of the character to set |
ch | The new character |
UnicodeString & UnicodeString::operator+= (UChar ch) [inline]
|
Append operator.
Append the character ch
to the UnicodeString object.
ch | the character to be appended |
UnicodeString & UnicodeString::operator+= (const UnicodeString & srcText) [inline]
|
Append operator.
Append the characters in srcText
to the UnicodeString object at offset start
. srcText
is not modified.
srcText | the source for the new characters |
UnicodeString & UnicodeString::append (const UnicodeString & srcText, UTextOffset srcStart, int32_t srcLength) [inline]
|
Append the characters in srcText
in the range [srcStart
, srcStart + srcLength
) to the UnicodeString object at offset start
.
srcText
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 append string |
UnicodeString & UnicodeString::append (const UnicodeString & srcText) [inline]
|
Append the characters in srcText
to the UnicodeString object at offset start
.
srcText
is not modified.
srcText | the source for the new characters |
UnicodeString & UnicodeString::append (const UChar * srcChars, UTextOffset srcStart, int32_t srcLength) [inline]
|
Append the characters in srcChars
in the range [srcStart
, srcStart + srcLength
) to the UnicodeString object at offset start
.
srcChars
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 append string |
UnicodeString & UnicodeString::append (const UChar * srcChars, int32_t srcLength) [inline]
|
Append the characters in srcChars
to the UnicodeString object at offset start
.
srcChars
is not modified.
srcChars | the source for the new characters |
srcLength |
the number of Unicode characters in srcChars |
UnicodeString & UnicodeString::append (UChar srcChar) [inline]
|
Append the character srcChar
to the UnicodeString object.
srcChar | the character to append |
UnicodeString & UnicodeString::insert (UTextOffset start, const UnicodeString & srcText, UTextOffset srcStart, int32_t srcLength) [inline]
|
Insert the characters in srcText
in the range [srcStart
, srcStart + srcLength
) into the UnicodeString object at offset start
.
srcText
is not modified.
start | the offset where the insertion begins |
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 |
UnicodeString & UnicodeString::insert (UTextOffset start, const UnicodeString & srcText) [inline]
|
Insert the characters in srcText
into the UnicodeString object at offset start
.
srcText
is not modified.
start | the offset where the insertion begins |
srcText | the source for the new characters |
UnicodeString & UnicodeString::insert (UTextOffset start, const UChar * srcChars, UTextOffset srcStart, int32_t srcLength) [inline]
|
Insert the characters in srcChars
in the range [srcStart
, srcStart + srcLength
) into the UnicodeString object at offset start
.
srcChars
is not modified.
start | the offset at which the insertion begins |
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 |
UnicodeString & UnicodeString::insert (UTextOffset start, const UChar * srcChars, int32_t srcLength) [inline]
|
Insert the characters in srcChars
into the UnicodeString object at offset start
.
srcChars
is not modified.
start | the offset where the insertion begins |
srcChars | the source for the new characters |
srcLength | the number of Unicode characters in srcChars. |
UnicodeString & UnicodeString::insert (UTextOffset start, UChar srcChar) [inline]
|
Insert the character srcChar
into the UnicodeString object at offset start
.
start | the offset at which the insertion occurs |
srcChar | the character to insert |
UnicodeString & UnicodeString::replace (UTextOffset start, int32_t length, const UnicodeString & srcText, UTextOffset srcStart, int32_t srcLength) [inline]
|
Replace the characters in the range [start
, start + length
) with the characters in srcText
in the range [srcStart
, srcStart + srcLength
).
srcText
is not modified.
start | the offset at which the replace operation begins |
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 & UnicodeString::replace (UTextOffset start, int32_t length, const UnicodeString & srcText) [inline]
|
Replace the characters in the range [start
, start + length
) with the characters in srcText
.
srcText
is not modified.
start | the offset at which the replace operation begins |
length |
the number of characters to replace. The character at start + length is not modified. |
srcText | the source for the new characters |
UnicodeString & UnicodeString::replace (UTextOffset start, int32_t length, const UChar * srcChars, UTextOffset srcStart, int32_t srcLength) [inline]
|
Replace the characters in the range [start
, start + length
) with the characters in srcChars
in the range [srcStart
, srcStart + srcLength
).
srcChars
is not modified.
start | the offset at which the replace operation begins |
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 |
UnicodeString & UnicodeString::replace (UTextOffset start, int32_t length, const UChar * srcChars, int32_t srcLength) [inline]
|
Replace the characters in the range [start
, start + length
) with the characters in srcChars
.
srcChars
is not modified.
start | the offset at which the replace operation begins |
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 |
UnicodeString & UnicodeString::replace (UTextOffset start, int32_t length, const UnicodeString & srcText) [inline]
|
Replace the characters in the range [start
, start + length
) with the character srcChar
.
start | the offset at which the replace operation begins |
length |
the number of characters to replace. The character at start + length is not modified. |
srcChar | the new character |
UnicodeString & UnicodeString::replaceBetween (UTextOffset start, UTextOffset limit, const UnicodeString & srcText) [inline]
|
Replace the characters in the range [start
, limit
) with the characters in srcText
.
srcText
is not modified.
start | the offset at which the replace operation begins |
limit | the offset immediately following the replace range |
srcText | the source for the new characters |
UnicodeString & UnicodeString::replaceBetween (UTextOffset start, UTextOffset limit, const UnicodeString & srcText, UTextOffset srcStart, UTextOffset srcLimit) [inline]
|
Replace the characters in the range [start
, limit
) with the characters in srcText
in the range [srcStart
, srcLimit
).
srcText
is not modified.
start | the offset at which the replace operation begins |
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 |
virtual void UnicodeString::handleReplaceBetween (UTextOffset start, UTextOffset limit, const UnicodeString & text) [virtual]
|
Replace a substring of this object with the given text.
start |
the beginning index, inclusive; 0 <= start <= limit . |
limit |
the ending index, exclusive; start <= limit <= length() . |
text |
the text to replace characters start to limit - 1 |
Reimplemented from Replaceable.
UnicodeString & UnicodeString::findAndReplace (const UnicodeString & oldText, const UnicodeString & newText) [inline]
|
Replace all occurrences of characters in oldText with the characters in newText.
oldText | the text containing the search text |
newText | the text containing the replacement text |
UnicodeString & UnicodeString::findAndReplace (UTextOffset start, int32_t length, const UnicodeString & oldText, const UnicodeString & newText) [inline]
|
Replace all occurrences of characters in oldText with characters in newText in the range [start
, start + length
).
start | the start of the range in which replace will performed |
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 |
UnicodeString & UnicodeString::findAndReplace (UTextOffset start, int32_t length, const UnicodeString & oldText, UTextOffset oldStart, int32_t oldLength, const UnicodeString & newText, UTextOffset newStart, int32_t newLength) |
Replace all occurrences of characters in oldText in the range [oldStart
, oldStart + oldLength
) with the characters in newText in the range [newStart
, newStart + newLength
) in the range [start
, start + length
).
start | the start of the range in which replace will performed |
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 |
UnicodeString & UnicodeString::remove (void) [inline]
|
Remove all characters from the UnicodeString object.
UnicodeString & UnicodeString::remove (UTextOffset start, int32_t length = LONG_MAX) [inline]
|
Remove the characters in the range [start
, start + length
) from the UnicodeString object.
start | the offset of the first character to remove |
length | the number of characters to remove |
UnicodeString & UnicodeString::removeBetween (UTextOffset start, UTextOffset limit = LONG_MAX) [inline]
|
Remove the characters in the range [start
, limit
) from the UnicodeString object.
start | the offset of the first character to remove |
limit | the offset immediately following the range to remove |
bool_t UnicodeString::padLeading (int32_t targetLength, UChar padChar = 0x0020) [inline]
|
Pad the start of this UnicodeString with the character padChar
.
If the length of this UnicodeString is less than targetLength, length() - targetLength copies of padChar will be added to the beginning of this UnicodeString.
targetLength | the desired length of the string |
padChar | the character to use for padding. Defaults to space (U+0020) |
bool_t UnicodeString::padTrailing (int32_t targetLength, UChar padChar = 0x0020) [inline]
|
Pad the end of this UnicodeString with the character padChar
.
If the length of this UnicodeString is less than targetLength, length() - targetLength copies of padChar will be added to the end of this UnicodeString.
targetLength | the desired length of the string |
padChar | the character to use for padding. Defaults to space (U+0020) |
bool_t UnicodeString::truncate (int32_t targetLength) [inline]
|
Truncate this UnicodeString to the targetLength
.
targetLength | the desired length of this UnicodeString. |
UnicodeString & UnicodeString::trim (void) [inline]
|
Trims leading and trailing whitespace from this UnicodeString.
UnicodeString & UnicodeString::reverse (void) [inline]
|
Reverse this UnicodeString in place.
UnicodeString & UnicodeString::reverse (UTextOffset start, int32_t length) [inline]
|
Reverse the range [start
, start + length
) in this UnicodeString.
start | the start of the range to reverse |
length | the number of characters to to reverse |
UnicodeString & UnicodeString::toUpper (void) |
Convert the characters in this to UPPER CASE following the conventions of the default locale.
UnicodeString & UnicodeString::toUpper (const Locale & locale) |
Convert the characters in this to UPPER CASE following the conventions of a specific locale.
locale | The locale containing the conventions to use. |
UnicodeString & UnicodeString::toLower (void) |
Convert the characters in this to UPPER CASE following the conventions of the default.
UnicodeString & UnicodeString::toLower (const Locale & locale) |
Convert the characters in this to UPPER CASE following the conventions of a specific locale.
locale | The locale containing the conventions to use. |
UnicodeString::UnicodeString () |
Construct an empty UnicodeString.
UnicodeString::UnicodeString (int32_t capacity) |
Construct a UnicodeString with capacity to hold capacity
UChars.
capacity | the number of UChars this UnicodeString should hold before a resize is necessary |
UnicodeString::UnicodeString (UChar ch) |
Single UChar constructor.
ch | the character to place in the UnicodeString |
UnicodeString::UnicodeString (const UChar * text) |
UChar* constructor.
text |
The characters to place in the UnicodeString. text must be NULL (U+0000) terminated. |
UnicodeString::UnicodeString (const UChar * text, int32_t textLength) |
UChar* constructor.
text | The characters to place in the UnicodeString. |
textLength |
The number of Unicode characters in text to copy. |
UnicodeString::UnicodeString (bool_t isTerminated, UChar * text, int32_t textLength) |
Aliasing UChar* constructor.
The text will be used for the new UnicodeString object, but it will not be released when the UnicodeString is destroyed. Be careful not to attempt to modify the contents of the UnicodeString if the text is read-only. Operations that allocate an entirely new buffer are harmless.
isTerminated |
specifies if text is NUL -terminated. This must be true if textLength==-1 . |
text | The characters to alias for the UnicodeString. |
textLength |
The number of Unicode characters in text to alias. If -1, then this constructor will determine the length by calling u_strlen() . |
UnicodeString::UnicodeString (const char * codepageData, const char * codepage = 0) |
char* constructor.
codepageData | an array of bytes, null-terminated |
codepage |
the encoding of codepageData . The special value 0 for codepage indicates that the text is in the platform's default codepage. If codepage is an empty string ("" ), then a simple conversion is performed on the codepage-invariant subset ("invariant characters") of the platform encoding. See utypes.h. |
UnicodeString::UnicodeString (const char * codepageData, int32_t dataLength, const char * codepage = 0) |
char* constructor.
codepageData | an array of bytes. |
dataLength |
The number of bytes in codepageData . |
codepage |
the encoding of codepageData . The special value 0 for codepage indicates that the text is in the platform's default codepage. If codepage is an empty string ("" ), then a simple conversion is performed on the codepage-invariant subset ("invariant characters") of the platform encoding. See utypes.h. |
UnicodeString::UnicodeString (const UnicodeString & that) [inline]
|
Copy constructor.
that | The UnicodeString object to copy. |
UnicodeString::~UnicodeString () |
Destructor.
int32_t UnicodeString::numDisplayCells (UTextOffset start = 0, int32_t length = LONG_MAX, bool_t asian = TRUE) const |
Returns the number of display cells occupied by the range [start
, length
).
This function is designed for Asian text and properly takes into account halfwidth and fullwidth variants of various CJK characters and the combining behavior of the Hangul Jamo characters (with some limitations; see documentation for Unicode::getCellWidth()).
In order to avoid dealing with fractions, this function can either be construed to return twice the actual number of display cells or to treat a "cell" as the width of a halfwidth character rather than the width of a fullwidth character.
start | the start of the range |
length | the number of characters to measure |
asian |
The asian parameter controls whether characters considered NEUTRAL by the Unicode class are treated as halfwidth or fullwidth here. If you set asian to FALSE, neutrals are treated as halfwidth, and this function returns a close approximation of how many Latin display cells the text will take up in a monospaced font. |
UCharReference UnicodeString::operator[] (UTextOffset pos) |
int32_t UnicodeString::size (void) const [inline]
|
UnicodeString & UnicodeString::findAndReplace (const UnicodeString & oldText, const UnicodeString & newText, UTextOffset start, int32_t length) [inline]
|
void * UnicodeString::operator new (size_t size) [inline]
|
void * UnicodeString::operator new (size_t size, void * location) [inline]
|
void UnicodeString::operator delete (void * location) [inline]
|
UnicodeString::UnicodeString (UChar * buff, int32_t bufLength, int32_t buffCapacity) |
const UChar* UnicodeString::getUChars (void) const |
const UChar * UnicodeString::getUniChars (void) const [inline]
|
UChar* UnicodeString::orphanStorage (void) |
friend class UnicodeStringStreamer [friend]
|