Aspose::Cells::U16String class

U16String class

Represents the char16_t array class and ends with u’\0'.

class U16String

Methods

MethodDescription
GetData() constGets the address of the char16_t array in this vector.
GetLength() constGets the length of the char16_t array in this Vector. Excluding the trailing u’\0'.
IndexOf(const char16_t value) constReturns the index of the first occurrence of the value in this.
IndexOf(const char16_t* value) constReturns the index of the first occurrence of the value in this.
IndexOf(const U16String& value) constReturns the index of the first occurrence of the value in this.
IsEmpty() constChecks whether the char16_t array is empty.
IsNull() constChecks whether the object array is nullptr.
explicit operator bool() constoperator bool()
operator+=(const U16String& str)Concatenate another string into this.
operator+=(const char* str)Concatenate another string into this.
operator+=(const char16_t* ustr)Concatenate another string into this.
operator+=(const char16_t ch)Concatenate a char16_t character into this.
operator=(const U16String& str)operator=
operator[](int32_t index)Array subscript operator.
ToUtf8(char* output, int32_t len) constConverts this to UTF8 string.
ToUtf8() constConverts this to std::string in UTF8 format. The result does not end with ‘\0’.
Trim() constTrims leading and trailing spaces in this.
U16String()Default constructor. Constructs an empty U16String object.
U16String(const char* str)Constructs from an const char* string.
U16String(const char16_t* ustr)Constructs from an const char16_t* string.
U16String(const char16_t* ustr, int32_t len)Constructs from const char16_t* string with specified length.
U16String(const U16String& src)Copy constructor.
~U16String()Destructor.

See Also