Class that represents a ustring primitive type. More...

#include <SPL/Runtime/Type/UString.h>

Detailed Description

Class that represents a ustring primitive type.

Constructor & Destructor Documentation

◆ ustring() [1/11]

Default constructor

◆ ustring() [2/11]

Constructor

Parameters

◆ ustring() [3/11]

Constructor

Parameters

◆ ustring() [4/11]

Constructor

Parameters

◆ ustring() [5/11]

Constructor

Parameters

◆ ustring() [6/11]

Constructor

Parameters

◆ ustring() [7/11]

Constructor

Parameters

◆ ustring() [8/11]

Constructor

Parameters

◆ ustring() [9/11]

Constructor

Parameters

◆ ustring() [10/11]

Constructor

Parameters

◆ ustring() [11/11]

Copy Contrstructor

Parameters

◆ ~ustring()

Destructor.

Member Function Documentation

◆ operator=()

Assignment operator

Parameters
Returns
reference to this

◆ length()

Return the length of a ustring in UChars

Returns
the number of UChar units in a ustring

◆ getBuffer()

Return a pointer to the ustring as a series of UChars

Returns
a pointer to the UChars representing the ustring

◆ operator==()

Compare two unicode strings for equality

Parameters
Returns
true if the strings are equal

◆ operator!=()

Compare two unicode strings for inequality

Parameters
Returns
true if the strings are not equal

◆ operator>()

Compare two unicode strings for greater than

Parameters
Returns
true if this ustring is greater than the rhs

◆ operator>=()

Compare two unicode strings for greater than or equal

Parameters
Returns
true if this ustring is greater than or equal to the rhs

◆ operator<()

Compare two unicode strings for less than

Parameters
Returns
true if this ustring is less than the rhs

◆ operator<=()

Compare two unicode strings for less than or equal

Parameters
Returns
true if this ustring is less than or equal to the rhs

◆ operator+=() [1/3]

Append a character to a ustring

Parameters
Returns
a reference to this

◆ operator+=() [2/3]

Append a character to a ustring

Parameters
Returns
a reference to this

◆ operator+=() [3/3]

Append a ustring to a ustring

Parameters
Returns
a reference to this

◆ append()

Append a ustring to a ustring

Parameters
Returns
a reference to this

◆ at()

Select one character from a unicode string

Parameters
Returns
a ustring consisting of the logical character at position index
Exceptions

◆ fromUTF8() [1/4]

Create from UTF-8

Parameters
Returns
resulting ustring
Exceptions

◆ fromUTF8() [2/4]

Create from UTF-8

Parameters
Returns
resulting ustring
Exceptions

◆ fromUTF8() [3/4]

Create from UTF-8

Parameters
Returns
resulting ustring
Exceptions

◆ fromUTF8() [4/4]

Create from UTF-8

Parameters
Returns
resulting ustring
Exceptions

◆ toUTF8()

Convert to UTF-8

Parameters
Returns
UTF-8 string

◆ getSerializedSize()

Get the size in bytes when serialized

Returns
size in bytes when serialized

◆ hashCode()

Get the hash code

Returns
hash code

◆ indexOf() [1/2]

Locate in this the first occurrence of the characters in text, using bitwise comparison

Parameters
Returns
The offset into this of the start of text, or -1 if not found

◆ indexOf() [2/2]

Locate in this the first occurrence of the characters in text, using bitwise comparison

Parameters
Returns
The offset into this of the start of text, or -1 if not found

◆ lastIndexOf() [1/2]

Locate in this the last occurrence of the characters in text, using bitwise comparison

Parameters
Returns
The offset into this of the start of text, or -1 if not found

◆ lastIndexOf() [2/2]

Locate in this the last occurrence of the characters in text, using bitwise comparison

Parameters
Returns
The offset into this of the start of text, or -1 if not found

◆ isEmpty()

Is this string empty?

Returns
'true' if the string is empty, else 'false'

◆ char32At()

Return the code unit at offset offset

Parameters
Returns
the code unit at offset offset or 0xffff if the offset is not valid for this string

◆ charAt()

Return the UChar at offset offset

Parameters
Returns
the code unit at offset offset or 0xffff if the offset is not valid for this string

◆ operator[]()

Return the UChar at offset offset

Parameters
Returns
the code unit at offset offset or 0xffff if the offset is not valid for this string

◆ moveIndex32()

Move the code unit index along the string by delta code points.

Parameters
Returns
the resulting code unit index

◆ countChar32()

Count Unicode code points in the length UChar code units of the string

Parameters
Returns
the number of code points in the specified code units

◆ toLower()

Convert to lower case

Returns
a reference to this

◆ toUpper()

Convert to upper case

Returns
a reference to this

◆ extract() [1/3]

Extract UChars from a ustring into a char buffer Copy the characters in the range [start, start + length) into the array dst

Parameters
Returns
the length of the output string, not counting the terminaling NUL

◆ extract() [2/3]

Extract UChars from a ustring into a char buffer Copy the characters in the range [start, start + length) into the array dst

Parameters
Returns
the length of the output string, not counting the terminaling NUL

◆ extract() [3/3]

Extract UChars from a ustring into a ustring Copy the characters in the range [start, start + length) into the target

Parameters

◆ remove() [1/2]

Remove all the characters in a ustring.

◆ remove() [2/2]

Remove characters in a ustring

Parameters

◆ truncate()

Truncate this ustring to the targetLength

Parameters

◆ toString() [1/3]

template<class T >

Convert an SPL value to ustring

Parameters
Returns
ustring representation

◆ toString() [2/3]

◆ toString() [3/3]

◆ compareCodePointOrder() [1/2]

Compare two ustrings in code point order

Parameters
Returns
a negative/zero/positive integer corresponding to whether this string is less than/equal to/greater than the second one in code point order

◆ compareCodePointOrder() [2/2]

Compare two ustrings in code point order

Parameters
Returns
a negative/zero/positive integer corresponding to whether this string is less than/equal to/greater than the second one in code point order

The documentation for this class was generated from the following file: