Utf8
object Utf8
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Returns the number of bytes in the UTF-8-encoded form of sequence
. For a string, this method is equivalent to string.getBytes(UTF_8).length
, but is more efficient in both time and space.
Link copied to clipboard
fun encodeUtf8Array(input: CharSequence, out: ByteArray, offset: Int = 0, length: Int = out.size - offset): Int
Link copied to clipboard
Encode a CharSequence UTF8 codepoint into a byte array.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Returns whether this is a four-byte codepoint with the form 11110xxx 0xF0..0xF4.
Link copied to clipboard
Returns whether this is a three-byte codepoint with the form 1110xxxx 0xE0..0xEF.
Link copied to clipboard
Returns whether this is a two-byte codepoint with the form 110xxxxx 0xC0..0xDF.