Struct Unicode
Provides utility methods for UTF-8, UTF-16, UCS-4 (a.k.a. UTF-32), and WTF-8.
Namespace: Unity.Collections
Assembly: solution.dll
Syntax
public struct Unicode
Fields
Name | Description |
---|---|
kMaximumValidCodePoint | The maximum value of a valid UNICODE code point |
Properties
Name | Description |
---|---|
BadRune | The null rune value. |
ReplacementCharacter | The Unicode character �. |
Methods
Name | Description |
---|---|
IsValidCodePoint(int) | Returns true if a code point is valid. |
NotTrailer(byte) | Returns true if the byte is not the last byte of a UTF-8 character. |
UcsToUtf16(char*, ref int, int, Rune) | Writes a rune to a buffer as a UTF-16 encoded character. |
UcsToUtf8(byte*, ref int, int, Rune) | Writes a rune to a buffer as a UTF-8 encoded character. |
Utf16ToUcs(out Rune, char*, ref int, int) | Reads a UTF-16 encoded character from a buffer. |
Utf16ToUtf8(char*, int, byte*, out int, int) | Copies UTF-16 characters from one buffer to another buffer as UTF-8. |
Utf8ToUcs(out Rune, byte*, ref int, int) | Reads a UTF-8 encoded character from a buffer. |
Utf8ToUtf16(byte*, int, char*, out int, int) | Copies UTF-8 characters from one buffer to another as UTF-16. |
Utf8ToUtf8(byte*, int, byte*, out int, int) | Copies UTF-8 characters from one buffer to another. |