Utf8String Class |
Namespace: CoronaLabs.WinRT
The Utf8String type exposes the following members.
Name | Description | |
---|---|---|
![]() | Utf8String | Creates an empty string. |
![]() | Utf8String(String) | Creates a new UTF-8 encoded string using the given UTF-16 encoded string. |
Name | Description | |
---|---|---|
![]() | Equals(Object) | Determines if this object matches the given object. |
![]() | Equals(Utf8String) | Determines if the given string matches this string. |
![]() ![]() | From | Converts the given UTF-16 string to a UTF-8 encoded string object. |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | ToLower | Creates and returns a copy of this string converted to lowercase. |
![]() | ToString | Converts this UTF-8 encoded string to a UTF-16 encoded standard string object. |
![]() | ToUpper | Creates and returns a copy of this string converted to uppercase. |
Name | Description | |
---|---|---|
![]() | ByteCount |
Gets the number of bytes used to store this UTF-8 encoded string, including the null termination character.
|
![]() | CharacterCount | Gets the number of characters in this string, excluding the null termination character. |
![]() ![]() | Empty | Represents an empty "" UTF-8 encoded string. |
![]() | IsEmpty | Determines if this string does not contain any characters. |
![]() | IsNotEmpty | Determines if this string contains any characters. |
This class provides an easy means of converting a UTF-16 string to a UTF-8 string and vice-versa. This class also supports converting to/from a standard .NET String or a C++/CX String object, which are UTF-16 string objects.
This UTF-8 string uses a "single byte" array used to store multibyte unicode characters. That is, a single character can range between 1 to 6 bytes depending on the character. Native C++/CX code can access this internal array as a "const char*" via the GetStringPointerFrom(Utf8String) method.
Instances of this class are immutable.