encodeChar

fun Encoding.encodeChar(char: Char, byteOrder: ByteOrder): ByteArray

Encodes a Char into a ByteArray using the given Encoding and ByteOrder.

Parameters

char

the Char to encode.

byteOrder

the ByteOrder to use. For Encoding where Encoding.byteSize is 1, this can be ignored.