UUIDA 128-bit universally unique identifier. Generate with UUID.generateV4 (random) or UUID.generateV7 (time-ordered, so fresh IDs sort by creation time), or parse the standard hyphenated form with UUID.parse:. Renders via s as the 36-character hyphenated lowercase form.
UUID.generateV4.s.length "* -> 36
The canonical hyphenated form (UUID.parse: reads it back).
A new random (version 4) UUID -- 122 random bits.
UUID.generateV4.version "* -> 4
A new time-ordered (version 7) UUID: a millisecond timestamp in the high bits plus randomness, so IDs generated later sort greater -- a good fit for database keys.
UUID.generateV7.version "* -> 7
The UUID written in the standard hyphenated String form; raises a ValueError if the argument is not one.
UUID.parse:'67e55044-10b1-426f-9247-bb680e5fe0c8' "* -> 67e55044-10b1-426f-9247-bb680e5fe0c8
Byte-order less-than against another UUID; for version-7 UUIDs this is creation order. The one native comparison -- the others derive from it.
Whether the argument is the same UUID (by value); a non-UUID is simply unequal, never an error.
The 16 raw bytes, big-endian.
(UUID.parse:'67e55044-10b1-426f-9247-bb680e5fe0c8').asBytes "* -> Bytes[16] 67 e5 50 44 10 b1 42 6f 92 47 bb 68 0e 5f e0 c8
The 36-character hyphenated lowercase form.
The UUID's version number -- 4 for random, 7 for time-ordered.
UUID.generateV7.version "* -> 7