encode

fun CharsetEncoder.encode(input: CharSequence, fromIndex: Int = 0, toIndex: Int = input.length): Source
fun CharsetEncoder.encode(input: CharArray, fromIndex: Int, toIndex: Int, dst: Sink)