Provides some useful functions for working with UUIDs, built on top of
java.util.UUID
.
Targeted at type-4 UUIDs. For more information you can consult Wikipedia, and the Java docs.
Provides some useful functions for working with UUIDs, built on top of `java.util.UUID`. Targeted at type-4 UUIDs. For more information you can consult [Wikipedia][], and the [Java docs][]. [Wikipedia]: http://en.wikipedia.org/wiki/Universally_unique_identifier [Java docs]: http://docs.oracle.com/javase/6/docs/api/java/util/UUID.html
(contains-uuid? s)
Checks if the given string contains a UUID, using regex.
Checks if the given string contains a UUID, using regex.
(extract-uuids s)
Extracts any and all UUIDs in the given string into a lazy sequence.
Extracts any and all UUIDs in the given string into a lazy sequence.
(from-string s)
Builds a java.util.UUID from the given string.
Builds a java.util.UUID from the given string.
(matches-uuid? s)
Checks if the given string contains exactly one UUID, and nothing more.
Checks if the given string contains exactly one UUID, and nothing more.
(parse-string s)
(parse-string s strict?)
Parses a string looking for one UUID via from-string
.
Can be executed in a strict, or non-strict mode. When strict an exception will be produced if the string does not contain a type-4 UUID.
Takes an optional second argument, which when truthy, causes parse-string
to throw an IllegalArgumentException
if the string does not match
uuid-pattern
.
Defaults to non-strict mode, and returns nil when the string does not match uuid-pattern.
Parses a string looking for one UUID via `from-string`. Can be executed in a strict, or non-strict mode. When strict an exception will be produced if the string does not contain a type-4 UUID. Takes an optional second argument, which when truthy, causes `parse-string` to throw an `IllegalArgumentException` if the string does not match `uuid-pattern`. Defaults to non-strict mode, and returns nil when the string does not match uuid-pattern.
(rand-uuid)
Returns a random java.util.UUID.
Returns a random java.util.UUID.
Defines transformations to UUIDs.
Supports conversion of a string to UUID, and a UUID to itself. Implementation of other conversions can be implemented with defmulti, with dispatch on type.
Defines transformations to UUIDs. Supports conversion of a string to UUID, and a UUID to itself. Implementation of other conversions can be implemented with defmulti, with dispatch on type.
A regular expression that will match type-4 UUIDs. This is a strict pattern,
which is less forgiving than java.util.UUID/fromString
.
A regular expression that will match type-4 UUIDs. This is a strict pattern, which is less forgiving than `java.util.UUID/fromString`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close