toHexString

Common
JVM
JS
Native
1.0
fun toHexString(): String
(source)

Returns the hexadecimal string representation of this uuid without hyphens.

The resulting string is in lowercase and consists of 32 characters. Each hexadecimal digit in the string sequentially represents the next 4 bits of the uuid, starting from the most significant 4 bits in the first digit to the least significant 4 bits in the last digit.

The returned string is equivalent to:

uuid.toByteArray().toHexString()
import kotlin.uuid.*

fun main(args: Array<String>) {
//sampleStart
val uuid = Uuid.fromULongs(0x550E8400E29B41D4uL, 0xA716446655440000uL)
println(uuid.toHexString()) // 550e8400e29b41d4a716446655440000
//sampleEnd
}

See Also

Uuid.parseHex