Generate UUID R←120⌶Y
This function generates a UUID (Universally Unique IDentifier) according to the RFC 9562 specification.
A UUID is a label that uniquely identifies objects in computer systems; it does not depend on a central registration authority or co-ordination between the parties generating them. UUIDs are also known as GUIDs (Globally Unique IDentifiers).
Y specifies the UUID version required. Supported values of Y are:
Y | Version |
|---|---|
| 4 | UUIDv4: random values |
| 7 | UUIDv7: a combination of values that are time-ordered (based on Unix Epoch) and random values |
The result R is a vector containing the generated 36-character UUID.
Example
120⌶4
32cd549f-eb33-4457-bf45-babf26dc2b53