toString
Returns the standard string representation of this uuid.
The resulting string is in the format "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", where 'x' represents a hexadecimal digit, also known as "hex-and-dash" format. It is in lowercase and consists of 36 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.
This format is the standard textual representation of uuids and is compatible with uuid parsing logic found in most software environments. It is specified by RFC 9562 section 4.
Since Kotlin
2.0See also
Samples
import kotlin.uuid.*
fun main() {
//sampleStart
val uuid = Uuid.fromULongs(0x550E8400E29B41D4uL, 0xA716446655440000uL)
println(uuid.toString()) // 550e8400-e29b-41d4-a716-446655440000
//sampleEnd
}