Method UTF8toUTF16
UTF8toUTF16(Byte[], Int32, Int32, CharsRef)
Interprets the given byte array as UTF-8 and converts to UTF-16. The CharsRef will be extended if it doesn't provide enough space to hold the worst case of each byte becoming a UTF-16 codepoint.
NOTE: Full characters are read, even if this reads past the length passed (and
can result in an
Declaration
public static void UTF8toUTF16(byte[] utf8, int offset, int length, CharsRef chars)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | utf8 | |
System.Int32 | offset | |
System.Int32 | length | |
CharsRef | chars |
UTF8toUTF16(BytesRef, CharsRef)
Utility method for UTF8toUTF16(Byte[], Int32, Int32, CharsRef)
Declaration
public static void UTF8toUTF16(BytesRef bytesRef, CharsRef chars)
Parameters
Type | Name | Description |
---|---|---|
BytesRef | bytesRef | |
CharsRef | chars |