UcsToUtf16(char*, ref int, int, Rune)
Writes a rune to a buffer as a UTF-16 encoded character.
Read time 1 minuteLast updated 14 days ago
Definition
- Type: Method
- Namespace: Unity.Collections
- Assembly: UnityEngine.ManagedKernelModule
UcsToUtf16(char*, int, int, Rune)
public static ConversionError UcsToUtf16(char* buffer, ref int index, int capacity, Unicode.Rune rune)
Parameters
The buffer of chars to write to.
Reference to a char index into the buffer. If the write succeeds, index is incremented by the size in chars of the character written. If the write fails, index is not incremented.
The size in chars of the buffer. Used to check that the write is in bounds.
The rune to encode.
Returns
Type | Description |
|---|---|
| ConversionError | ConversionError.None if the write succeeds. Otherwise, returns ConversionError.CodePoint, ConversionError.Overflow, or ConversionError.Encoding. |