uuid.pl -- Universally Unique Identifier (UUID) Library
The library provides operations on UUIDs. Please consult other sources for understanding UUIDs and the implications of the different UUID versions. Some typical calls are given below:
?- uuid(X). X = 'ea6589fa-19dd-11e2-8a49-001d92e1879d'. ?- uuid(X, [url('http://www.swi-prolog.org')]). X = '73a07870-6a90-3f2e-ae2b-ffa538dc7c2c'.
- uuid(-UUID) is det
- UUID is an atom representing a new UUID. This is the same as
calling
uuid(UUID, [])
. See uuid/2 for options. - uuid(-UUID, +Options) is det
- Create a new UUID according to Options. The following options
are defined:
- version(+Versions)
- Integer in the range 1..5, which specifies the UUID version that is created. Default is 1.
- dns(DNS)
- url(URL)
- oid(OID)
- x500(X500)
- Provide additional context information for UUIDs using version 3 or 5. If there is no explicit version option, UUID version 3 is used.
- format(+Format)
- Representation of the UUID. Default is
atom
, yielding atoms such as8304efdd-bd6e-5b7c-a27f-83f3f05c64e0
. The alternative isinteger
, returning a large integer that represents the 128 bits of the UUID.