variant
The variant of the Uuid, determines the interpretation of the bits.
0– special case for the Nil UUID as well as reserved for NCS2– Leach-Salz, as defined in RFC 4122 and used by this class6– reserved for Microsoft (GUID) backwards compatibility7– reserved for future extension
Return
The variant number of this Uuid.
See also
Samples
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertFails
import kotlin.test.assertFailsWith
import kotlin.test.assertNull
fun main() {
//sampleStart
assertEquals(0, uuidFrom("00000000-0000-0000-0000-000000000000").variant, "Nil or NCS")
assertEquals(2, uuidFrom("00000000-0000-0000-8000-000000000000").variant, "RFC 4122")
assertEquals(6, uuidFrom("00000000-0000-0000-c000-000000000000").variant, "Microsoft")
assertEquals(7, uuidFrom("00000000-0000-0000-e000-000000000000").variant, "Future")
//sampleEnd
}