binary-streams / loggersoft.kotlin.streams / kotlin.Int

Extensions for kotlin.Int

isCodePointAscii

Returns true if this code point is the valid ASCII character.

fun Int.isCodePointAscii(): Boolean

toUtf8

Encodes this code point to UTF-8 and writes result into buffer starting from offset.

fun Int.toUtf8(buffer: ByteArray, offset: Int = 0): Int

utf8Size

Returns a number of bytes required to represent this code point in UTF-8 or -1 for invalid code point.

fun Int.utf8Size(): Int