toString

Returns a string representation of this Byte value in the specified radix.

fun UByte.toString(radix: Int): String(source)
fun main() {
    val value: UByte = 255u

    println("Decimal: ${value.toString(10)}") // 255
    println("Hex: ${value.toString(16)}")    // ff
    println("Binary: ${value.toString(2)}")  // 11111111
}

Source