Utf8StringByteCount Property |
Gets the number of bytes used to store this UTF-8 encoded string, including the null termination character.
Namespace: CoronaLabs.WinRTAssembly: CoronaLabs (in CoronaLabs.dll) Version: 255.255.255.255
Syntaxpublic int ByteCount { get; }
Public ReadOnly Property ByteCount As Integer
Get
Property Value
Type:
Int32The number of bytes used to store this UTF-8 encoded string, including the null termination character.
Returns 1 if this is an empty string. The 1 byte is used by the null termination character.
Note that this property will never return zero.
Remarks
Note that you cannot assume that 1 byte represents 1 character in a UTF-8 encoded string.
A UTF-8 encoded character can range between 1 to 6 bytes. An ASCII character will always be 1 byte,
but a unicode character will range between 2 and 6 bytes.
See Also