Click or drag to resize
Utf8String Class
Represents a UTF-8 encoded string.
Inheritance Hierarchy
SystemObject
  CoronaLabs.WinRTUtf8String

Namespace: CoronaLabs.WinRT
Assembly: CoronaLabs (in CoronaLabs.dll) Version: 255.255.255.255
Syntax
public sealed class Utf8String : __IUtf8StringPublicNonVirtuals

The Utf8String type exposes the following members.

Constructors
  NameDescription
Public methodUtf8String
Creates an empty string.
Public methodUtf8String(String)
Creates a new UTF-8 encoded string using the given UTF-16 encoded string.
Top
Methods
  NameDescription
Public methodEquals(Object)
Determines if this object matches the given object.
Public methodEquals(Utf8String)
Determines if the given string matches this string.
Public methodStatic memberFrom
Converts the given UTF-16 string to a UTF-8 encoded string object.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToLower
Creates and returns a copy of this string converted to lowercase.
Public methodToString
Converts this UTF-8 encoded string to a UTF-16 encoded standard string object.
Public methodToUpper
Creates and returns a copy of this string converted to uppercase.
Top
Properties
  NameDescription
Public propertyByteCount
Gets the number of bytes used to store this UTF-8 encoded string, including the null termination character.
Public propertyCharacterCount
Gets the number of characters in this string, excluding the null termination character.
Public propertyStatic memberEmpty
Represents an empty "" UTF-8 encoded string.
Public propertyIsEmpty
Determines if this string does not contain any characters.
Public propertyIsNotEmpty
Determines if this string contains any characters.
Top
Remarks

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.

See Also

Reference

NativeStringServices