readTextExactCharacters

fun Source.readTextExactCharacters(charactersCount: Int, charset: Charset = Charsets.UTF_8): String(source)

Read exactly charactersCount characters interpreting bytes in the specified charset.

Report a problem

Throws

if charset is not UTF_8 and is not a supported single-byte charset