Method Utf8ToUtf16
Utf8ToUtf16(byte*, int, char*, out int, int)
Copies UTF-8 characters from one buffer to another as UTF-16.
Declaration
public static ConversionError Utf8ToUtf16(byte* utf8Buffer, int utf8Length, char* utf16Buffer, out int utf16Length, int utf16Capacity)
Parameters
Type | Name | Description |
---|---|---|
byte* | utf8Buffer | The source buffer. |
int | utf8Length | The number of bytes to read from the source. |
char* | utf16Buffer | The destination buffer. |
int | utf16Length | Outputs the number of chars written to the destination. |
int | utf16Capacity | The size in chars of the destination buffer. |
Returns
Type | Description |
---|---|
ConversionError |
Remarks
Assumes the source data is valid UTF-8.