Liking cljdoc? Tell your friends :D
Clojure only.

io.randomseed.utils

Random support functions and macros.

Random support functions and macros.
raw docstring

add-spc-bclj

(add-spc-b s)

Adds space characters to the beginning and end of the given string s if it is not an empty string. Otherwise it returns a string with a single space.

Adds space characters to the beginning and end of the given string `s` if it is not
an empty string. Otherwise it returns a string with a single space.
sourceraw docstring

add-spc-lclj

(add-spc-l s)

Prepends space character to the given string s if it is not an empty string.

Prepends space character to the given string `s` if it is not an empty string.
sourceraw docstring

add-spc-rclj

(add-spc-r s)

Appends space character to the given string s if it is not an empty string or a single space.

Appends space character to the given string `s` if it is not an empty string or a
single space.
sourceraw docstring

askclj

(ask &
     {:keys [ask-fn allow-empty? empty-nil? empty-quits? empty-quits-nil? prompt
             confirm-prompt not-match-msg empty-msg retries confirmation?]
      :or {confirm-prompt "Repeat text: "
           not-match-msg "Texts do not match."
           empty-msg "Text is empty."
           empty-nil? false
           confirmation? true
           empty-quits-nil? true
           ask-fn read-line-with-prompt
           prompt "Enter text: "
           allow-empty? false
           empty-quits? false}})

Ask user for a string with optional confirmation using ask-fn to get a string (or nil). Repeats until two entered strings are the same and are not empty. Keyword arguments can be given to configure behavior: prompt (message displayed when asking for first string), confirm-prompt (message displayed when asking for the same string again), not-match-msg (message displayed when strings do not match), empty-msg (message displayed when the entered string is empty), retries (number of retries before quitting the loop; when set to nil or not given, it will continue indefinitely), confirmation? (requires string to be re-entered for confirmation, defaults to true), allow-empty? (allows the entered string to be empty; defaults to false), empty-nil? (returns nil instead of an empty string; defaults to false), empty-quits? (short-circuits on any empty string and returns nil; defaults to false), empty-quits-nil? (returns nil when quitting on empty string; defaults to true). Returns the entered string or nil.

Ask user for a string with optional confirmation using ask-fn to get a string (or nil).
Repeats until two entered strings are the same and are not empty.
Keyword arguments can be given to configure behavior:
`prompt` (message displayed when asking for first string),
`confirm-prompt` (message displayed when asking for the same string again),
`not-match-msg` (message displayed when strings do not match),
`empty-msg` (message displayed when the entered string is empty),
`retries` (number of retries before quitting the loop; when set to `nil` or not
given, it will continue indefinitely),
`confirmation?` (requires string to be re-entered for confirmation, defaults to `true`),
`allow-empty?` (allows the entered string to be empty; defaults to `false`),
`empty-nil?` (returns `nil` instead of an empty string; defaults to `false`),
`empty-quits?` (short-circuits on any empty string and returns `nil`; defaults to `false`),
`empty-quits-nil?` (returns `nil` when quitting on empty string; defaults to `true`).
Returns the entered string or `nil`.
sourceraw docstring

atom?clj

(atom? v)
source

b64-to-bytesclj

(b64-to-bytes s)

Converts Base64 encoded string to array of bytes.

Converts Base64 encoded string to array of bytes.
sourceraw docstring

bytes-concatclj

(bytes-concat)
(bytes-concat bary)
(bytes-concat bary & byte-arys)

Concatenates byte arrays.

Concatenates byte arrays.
sourceraw docstring

bytes-to-stringclj

(bytes-to-string b)

Converts bytes into a string

Converts bytes into a string
sourceraw docstring

bzeroclj

Returns zeroed array of bytes.

Returns zeroed array of bytes.
sourceraw docstring

char-ranges->setclj

(char-ranges->set & ranges)

Returns a set of characters defined as a collection of collections with start and stop character, e.g.: [\A \Z][\0 \9]

Returns a set of characters defined as a collection of collections with start and
stop character, e.g.: [\A \Z][\0 \9]
sourceraw docstring

const-form?clj

(const-form? x)

Returns true when x is nil or is of one of the following types: string or keyword or boolean or number or character. Otherwise returns false.

Returns `true` when `x` is `nil` or is of one of the following types: string or
keyword or boolean or number or character. Otherwise returns `false`.
sourceraw docstring

contains-some?clj

(contains-some? s1 s2)

Takes two indexed collections and returns true if at least one element is shared in both. Otherwise it returns false.

Takes two indexed collections and returns true if at least one element is shared in
both. Otherwise it returns false.
sourceraw docstring

count-digitsclj

(count-digits n)

Returns a number of digits in a decimal number n.

Returns a number of digits in a decimal number `n`.
sourceraw docstring

current-threadclj

(current-thread)
source

current-thread-idclj

(current-thread-id)
source

current-thread-nameclj

(current-thread-name)
source

defdoc!cljmacro

(defdoc! v docstr)
source

empty-ident?clj

(empty-ident? v)

Returns true if v is an empty identifier.

Returns `true` if `v` is an empty identifier.
sourceraw docstring

empty-string?clj

(empty-string? s)

Returns true if s is an empty string. Will throw an exception when s is not a string.

Returns `true` if `s` is an empty string. Will throw an exception when `s` is not a
string.
sourceraw docstring

ensure-ident-keywordclj

(ensure-ident-keyword id)
source

ensure-keywordclj

(ensure-keyword id)

Takes an identifier id and tries to convert it to a keyword. If it is not an identifier, it calls keyword.

Takes an identifier `id` and tries to convert it to a keyword. If it is not an
identifier, it calls `keyword`.
sourceraw docstring

ensure-keyword-having-nsclj

(ensure-keyword-having-ns id ns)
source

ensure-namespaced-keywordclj

(ensure-namespaced-keyword id ns)
source

ensure-nsclj

(ensure-ns id ns)

Takes an identifier id and a namespace ns (a string), and tries to set a namespace in the identifier. If a namespace already exists in identifier, it is not changed.

Takes an identifier `id` and a namespace `ns` (a string), and tries to set a
namespace in the identifier. If a namespace already exists in identifier, it is not
changed.
sourceraw docstring

ensure-strclj

(ensure-str v)
(ensure-str v & more)
source

exception?clj

(exception? v)
source

find-firstclj

(find-first f coll)
(find-first f coll not-found)

Returns the first item from coll for which (f item) returns true or nil if no such item is present. If the given not-found value is supplied, it will return it instead of nil.

Returns the first item from coll for which (f item) returns true or nil if no such
item is present. If the given not-found value is supplied, it will return it
instead of nil.
sourceraw docstring

fn-nameclj

(fn-name f)

Tries to obtain symbolic function name for the given function f. Uses metadata and Java reflection as fallback.

Tries to obtain symbolic function name for the given function `f`. Uses metadata and
Java reflection as fallback.
sourceraw docstring

gen-digitsclj

(gen-digits num)
(gen-digits num rng)

Generates the given number of random digits and converts all into a single string. When the second argument is present it should be an instance of random number generator used to get the digits.

Generates the given number of random digits and converts all into a single string.
When the second argument is present it should be an instance of random number
generator used to get the digits.
sourceraw docstring

get-rand-intclj

(get-rand-int n)
(get-rand-int n rng)

Like rand-int but optionally uses random number generator.

Like rand-int but optionally uses random number generator.
sourceraw docstring

inferred-contains?clj

(inferred-contains? coll k)

Just like the contains? but if the keyword is namespace-qualified it also checks if the collection contains the same keyword as its key but without a namespace.

Just like the contains? but if the keyword is namespace-qualified it also checks if
the collection contains the same keyword as its key but without a namespace.
sourceraw docstring

inferred-getclj

(inferred-get coll k)
(inferred-get coll k default)

Just like the get function but if the keyword is namespace-qualified it first attempts to look for the value associated with it. If that fails it uses the variant of the keyword without any namespace.

Just like the get function but if the keyword is namespace-qualified it first
attempts to look for the value associated with it. If that fails it uses the
variant of the keyword without any namespace.
sourceraw docstring

insert-atclj

(insert-at index coll element)

Takes an index number index, a collection coll and an element element, and inserts element's value under the given index number. Uses sequential operations: split-at, concat and cons.

Takes an index number `index`, a collection `coll` and an element `element`, and
inserts element's value under the given index number. Uses sequential operations:
`split-at`, `concat` and `cons`.
sourceraw docstring

instant?clj

(instant? v)
source

iscljmacro

(is pred val & body)

Takes a predicate pred, a value val and a body. Evaluates val and passes to pred. If the result is truthy it evaluates all expressions from body in an explicit do. Otherwise it returns the value.

Takes a predicate `pred`, a value `val` and a body. Evaluates `val` and passes to
`pred`. If the result is truthy it evaluates all expressions from body in an
explicit `do`. Otherwise it returns the value.
sourceraw docstring

is-notcljmacro

(is-not pred val & body)

Takes a predicate pred, a value val and a body. Evaluates val and passes to pred. If the result is truthy it returns the value. Otherwise it evaluates all expressions from body in an explicit do.

Takes a predicate `pred`, a value `val` and a body. Evaluates `val` and passes to
`pred`. If the result is truthy it returns the value. Otherwise it evaluates all
expressions from body in an explicit `do`.
sourceraw docstring

juxt-seqclj

(juxt-seq & functions)

Like clojure.core/juxt but produces lazy sequence of results instead of a vector.

Like `clojure.core/juxt` but produces lazy sequence of results instead of a vector.
sourceraw docstring

lazy-iterator-seqclj

(lazy-iterator-seq coll)
(lazy-iterator-seq coll iter)

Returns a lazy sequence as an interface to the given iterable Java object.

Returns a lazy sequence as an interface to the given iterable Java object.
sourceraw docstring

mapplyclj

(mapply f & args)

Like apply but works on named arguments. Takes function f and a list of arguments to be passed, were the last argument should be a map that will be decomposed and passed as named arguments.

Returns the result of calling f.

Like apply but works on named arguments. Takes function f and a list of
arguments to be passed, were the last argument should be a map that will be
decomposed and passed as named arguments.

Returns the result of calling f.
sourceraw docstring

must-have-nsclj

(must-have-ns id ns)
source

named-to-strclj

(named-to-str v)

Converts a value v to a string. If keyword is given, it will have : character removed.

Converts a value `v` to a string. If keyword is given, it will have `:` character
removed.
sourceraw docstring

named-to-str-trimclj

(named-to-str-trim v)

Converts a value v to a string and trims its both sides. If keyword is given, it will have : character removed.

Converts a value `v` to a string and trims its both sides. If keyword is given, it
will have `:` character removed.
sourceraw docstring

nil-or-empty-str?clj

(nil-or-empty-str? x)

Returns true if the given x is nil or an empty string.

Returns `true` if the given `x` is `nil` or an empty string.
sourceraw docstring

nil-spc-or-empty-strclj

(nil-spc-or-empty-str s)

Takes a string or nil object s and returns an empty string if it is nil, empty string or a string containing a single space only.

Takes a string or `nil` object `s` and returns an empty string if it is `nil`, empty
string or a string containing a single space only.
sourceraw docstring

nil-spc-or-empty-str?clj

(nil-spc-or-empty-str? s)

Returns true if the given value s is nil, an empty string or a string containing a single space only.

Returns `true` if the given value `s` is `nil`, an empty string or a string
containing a single space only.
sourceraw docstring

normalize-nameclj

(normalize-name some-name)
(normalize-name some-name default-name)

Takes a name expressed as a string or an identifier. If the object is an identifier (a symbol or a keyword) then it converts it to a string using name function. If the second argument is present then it uses it when the given name or a name derived from identifier is empty.

Takes a name expressed as a string or an identifier. If the object is an identifier
(a symbol or a keyword) then it converts it to a string using name function. If the
second argument is present then it uses it when the given name or a name derived
from identifier is empty.
sourceraw docstring

normalize-name-with-nsclj

(normalize-name-with-ns some-name)
(normalize-name-with-ns some-name default-name)

Takes a name expressed as a string or an identifier. If the object is an identifier (a symbol or a keyword) then it converts it to a string using namespace and name functions. If the second argument is present then it uses it when the given name or a name derived from identifier is empty.

Takes a name expressed as a string or an identifier. If the object is an identifier
(a symbol or a keyword) then it converts it to a string using namespace and name
functions. If the second argument is present then it uses it when the given name or
a name derived from identifier is empty.
sourceraw docstring

normalize-to-bytesclj

(normalize-to-bytes t)
source

not-empty-ident?clj

(not-empty-ident? v)

Returns true if v is not an empty identifier.

Returns `true` if `v` is not an empty identifier.
sourceraw docstring

not-empty-string?clj

(not-empty-string? s)

Returns true if s is not an empty string. Will throw an exception when s is not a string.

Returns `true` if `s` is not an empty string. Will throw an exception when `s` is
not a string.
sourceraw docstring

not-valuablecljmacro

(not-valuable & more)
source

not-valuable?clj

(not-valuable? x)

Returns true if x not valuable: is nil or empty.

Returns `true` if `x` not valuable: is `nil` or empty.
sourceraw docstring

ns-inferclj

(ns-infer ns-name k)
(ns-infer ns-name k use-infer)

Takes a string of namespace name and a keyword. If the given keyword is not namespace-qualified it returns a new keyword with the given namespace added. If the given keyword is already equipped with a namespace it returns it.

Takes a string of namespace name and a keyword. If the given keyword is not
namespace-qualified it returns a new keyword with the given namespace added. If the
given keyword is already equipped with a namespace it returns it.
sourceraw docstring

or-somecljmacro

(or-some)
(or-some x)
(or-some x & next)

Same as or but returns first value which is strictly not nil.

Same as `or` but returns first value which is strictly not `nil`.
sourceraw docstring

parse-longclj

(parse-long s)
(parse-long s default)
source

parse-numclj

(parse-num n)
(parse-num n default)
source

parse-percentclj

(parse-percent n)
(parse-percent n default)
source

parse-reclj

(parse-re v)
source

parse-urlclj

(parse-url u)

Parses URL into a map.

Parses URL into a map.
sourceraw docstring

percentclj

source

pos-valclj

(pos-val x)

Returns the given value x if it is a positive number. Otherwise it returns nil.

Returns the given value `x` if it is a positive number. Otherwise it returns `nil`.
sourceraw docstring

qsomecljmacro

(qsome pred coll)

Same as clojure.core/some but when coll is a constant form then a source code with or expression is generated instead of some with recurrent predicate application.

Same as `clojure.core/some` but when `coll` is a constant form then a source code
with `or` expression is generated instead of `some` with recurrent predicate
application.
sourceraw docstring

qstrbcljmacro

(qstrb)
(qstrb a)
(qstrb a & more)

Calls strb but checks if the first and only argument is a string, and if it so, returns its literal form without calling strb.

Calls `strb` but checks if the first and only argument is a string, and if it so,
returns its literal form without calling `strb`.
sourceraw docstring

random-digits-lenclj

(random-digits-len x iteration shrink-now)
(random-digits-len x iteration shrink-now rng)

For 0 or 1 it returns its argument. For other positive numbers it returns a random natural number from 1 to this number (inclusive) in 50% cases. In other 50% cases it returns its argument.

For 0 or 1 it returns its argument. For other positive numbers it returns a random
natural number from 1 to this number (inclusive) in 50% cases. In other 50% cases
it returns its argument.
sourceraw docstring

random-uuidclj

(random-uuid)
source

read-line-with-promptclj

(read-line-with-prompt)
(read-line-with-prompt prompt)

Reads a line of text from console with optional prompt. Returns a string or nil when the entered string is empty.

Reads a line of text from console with optional prompt. Returns a string or `nil`
when the entered string is empty.
sourceraw docstring

replace-firstclj

(replace-first s c r)

Replaces the first appearance of a character c in the given string s with a character r.

Replaces the first appearance of a character `c` in the given string `s` with a
character `r`.
sourceraw docstring

safe-parse-longclj

(safe-parse-long v)
(safe-parse-long v default)
source

safe-parse-numclj

(safe-parse-num v)
(safe-parse-num v default)
source

safe-parse-percentclj

(safe-parse-percent v)
(safe-parse-percent v default)
source

sanitize-base-urlclj

(sanitize-base-url url)
source

simple-keyword-upclj

(simple-keyword-up v)
source

simple-quote-form?clj

(simple-quote-form? x)

Returns true when x is a list or is an instance of clojure.lang.Cons, has 2 elements or less and its first element is the quote symbol, plus its second element is a symbol or const-form? returns true for it.

Returns `true` when `x` is a list or is an instance of `clojure.lang.Cons`, has 2
elements or less and its first element is the `quote` symbol, plus its second
element is a symbol or `const-form?` returns `true` for it.
sourceraw docstring

simple-symbol-upclj

(simple-symbol-up v)
source

some-fn*clj

(some-fn* p)
(some-fn* p1 p2)
(some-fn* p1 p2 p3)
(some-fn* p1 p2 p3 p4)
(some-fn* p1 p2 p3 p4 & preds)

Same as clojure.core/some-fn but multiple arguments are passed to each predicate function and nullary variant is not returning nil but calls each predicate without passing any arguments.

Takes a set of predicates and returns a function that returns the first truthy value (not nil and not false) returned by one of its composing predicates against all of its arguments, else it returns a value returned by the last predicate given (which may be false or nil).

Same as `clojure.core/some-fn` but multiple arguments are passed to each predicate
function and nullary variant is not returning `nil` but calls each predicate
without passing any arguments.

Takes a set of predicates and returns a function that returns the first truthy
value (not `nil` and not `false`) returned by one of its composing predicates
against all of its arguments, else it returns a value returned by the last
predicate given (which may be `false` or `nil`).
sourceraw docstring

some-keywordclj

(some-keyword v)
source

some-keyword-simpleclj

(some-keyword-simple v)
source

some-keyword-upclj

(some-keyword-up v)
source

some-longclj

(some-long s)
(some-long s default)
source

some-strclj

(some-str v)

Converts the given value v to a string. Keywords are transformed to strings without the : prefix. Empty string or nil will result in nil being returned.

Converts the given value `v` to a string. Keywords are transformed to strings
without the `:` prefix. Empty string or `nil` will result in `nil` being returned.
sourceraw docstring

some-str-downclj

(some-str-down v)

Converts the given value v to a lowercase string. Keywords are transformed to strings without the : prefix. Empty string or nil will result in nil being returned.

Converts the given value `v` to a lowercase string. Keywords are transformed to
strings without the `:` prefix. Empty string or `nil` will result in `nil` being
returned.
sourceraw docstring

some-str-simpleclj

(some-str-simple v)

Converts the given value v to a string. If v is an identifier only its name part is used and namespace is ignored. Keywords are transformed to strings without the : prefix. Empty string or nil will result in nil being returned.

Converts the given value `v` to a string. If `v` is an identifier only its name part
is used and namespace is ignored. Keywords are transformed to strings without the
`:` prefix. Empty string or `nil` will result in `nil` being returned.
sourceraw docstring

some-str-simple-downclj

(some-str-simple-down v)

Converts the given value v to a lowercase string. If v is an identifier only its name part is used and namespace is ignored. Keywords are transformed to strings without the : prefix. Empty string or nil will result in nil being returned.

Converts the given value `v` to a lowercase string. If `v` is an identifier only its
name part is used and namespace is ignored. Keywords are transformed to strings
without the `:` prefix. Empty string or `nil` will result in `nil` being returned.
sourceraw docstring

some-str-simple-upclj

(some-str-simple-up v)

Converts the given value v to an uppercase string. If v is an identifier only its name part is used and namespace is ignored. Keywords are transformed to strings without the : prefix. Empty string or nil will result in nil being returned.

Converts the given value `v` to an uppercase string. If `v` is an identifier only
its name part is used and namespace is ignored. Keywords are transformed to strings
without the `:` prefix. Empty string or `nil` will result in `nil` being returned.
sourceraw docstring

some-str-spcclj

(some-str-spc s & more)

Takes one or more strings or other objects convertable to strings and concatenates them with spaces. Keywords are transformed to strings without the : prefix.

Takes one or more strings or other objects convertable to strings and concatenates
them with spaces. Keywords are transformed to strings without the `:` prefix.
sourceraw docstring

some-str-squeeze-spcclj

(some-str-squeeze-spc s & more)

Takes one or more strings or other objects convertable to strings and concatenates them with spaces and squeezes spaces in a resulting string which is returned. Keywords are transformed to strings without the : prefix.

Takes one or more strings or other objects convertable to strings and concatenates
them with spaces and squeezes spaces in a resulting string which is
returned. Keywords are transformed to strings without the `:` prefix.
sourceraw docstring

some-str-upclj

(some-str-up v)

Converts the given value v to an uppercase string. Keywords are transformed to strings without the : prefix. Empty string or nil will result in nil being returned.

Converts the given value `v` to an uppercase string. Keywords are transformed to
strings without the `:` prefix. Empty string or `nil` will result in `nil` being
returned.
sourceraw docstring

some-stringclj

(some-string s)

Takes a string s and returns it unless its value is nil or it is an empty string. A bit more performant but will throw an exception when s is not a string nor nil.

Takes a string `s` and returns it unless its value is `nil` or it is an empty
string. A bit more performant but will throw an exception when `s` is not a
string nor `nil`.
sourceraw docstring

some-symbolclj

(some-symbol v)
source

some-symbol-simpleclj

(some-symbol-simple v)
source

some-symbol-upclj

(some-symbol-up v)
source

str-spcclj

(str-spc s & more)

Takes one or more strings or other objects convertable to strings and concatenates them with spaces.

Takes one or more strings or other objects convertable to strings and concatenates
them with spaces.
sourceraw docstring

str-squeeze-spcclj

(str-squeeze-spc s & more)

Takes one or more strings or other objects convertable to strings and concatenates them with spaces and squeezes spaces in a resulting string which is returned.

Takes one or more strings or other objects convertable to strings and concatenates
them with spaces and squeezes spaces in a resulting string which is
returned.
sourceraw docstring

strbclj

(strb a)
(strb a b)
(strb a b c)
(strb a b c d)
(strb a b c d e)
(strb a b c d e & more)

Like clojure.core/str but faster. Be aware that all arguments except first must be of type String or nil.

Like `clojure.core/str` but faster. Be aware that all arguments except first must be
of type `String` or `nil`.
sourceraw docstring

strscljmacro

(strs)
(strs a)
(strs a & more)

Converts all arguments to strings and concatenates them with keywords being converted to strings without the : prefix. Neighbouring literal strings and known constant forms will be concatenated at compile time.

Converts all arguments to strings and concatenates them with keywords being
converted to strings without the `:` prefix. Neighbouring literal strings and known
constant forms will be concatenated at compile time.
sourceraw docstring

strs-simplecljmacro

(strs-simple)
(strs-simple a)
(strs-simple a & more)

Converts all arguments to strings and concatenates them. Neighbouring literal strings and known constant forms will be concatenated at compile time.

Converts all arguments to strings and concatenates them. Neighbouring literal
strings and known constant forms will be concatenated at compile time.
sourceraw docstring

strspccljmacro

(strspc)
(strspc a)
(strspc a & more)

Converts all arguments to strings and concatenates them with keywords being converted to strings without the : prefix. Neighbouring literal strings and known constant forms will be trimmed on both ends and concatenated at compile time with space characters.

For consecutive non-constant forms (like symbols) simple wrappers will be generated to ensure they are properly trimmed and separated with spaces depending on their values (only single space and empty string are detected).

Converts all arguments to strings and concatenates them with keywords being
converted to strings without the `:` prefix. Neighbouring literal strings and known
constant forms will be trimmed on both ends and concatenated at compile time with
space characters.

For consecutive non-constant forms (like symbols) simple wrappers will be generated
to ensure they are properly trimmed and separated with spaces depending on their
values (only single space and empty string are detected).
sourceraw docstring

strspc-squeezedcljmacro

(strspc-squeezed)
(strspc-squeezed a)
(strspc-squeezed a & more)

Converts all arguments to strings and concatenates them with keywords being converted to strings without the : prefix. Neighbouring literal strings and known constant forms will be trimmed on both ends and concatenated at compile time with space characters.

For consecutive non-constant forms (like symbols) simple wrappers will be generated to ensure they are properly trimmed and separated with spaces depending on their values (only single space and empty string are detected).

Moreover, spaces will be squeezed for detected constant forms at compile time. No squeezing will be performed at run-time.

Converts all arguments to strings and concatenates them with keywords being
converted to strings without the `:` prefix. Neighbouring literal strings and known
constant forms will be trimmed on both ends and concatenated at compile time with
space characters.

For consecutive non-constant forms (like symbols) simple wrappers will be generated
to ensure they are properly trimmed and separated with spaces depending on their
values (only single space and empty string are detected).

Moreover, spaces will be squeezed for detected constant forms at compile time. No
squeezing will be performed at run-time.
sourceraw docstring

text-to-bytesclj

(text-to-bytes t)
source

throwable?clj

(throwable? v)
source

to-bytesclj

(to-bytes obj)

Converts object to bytes by converting it to a string first with UTF-8 encoding.

Converts object to bytes by converting it to a string first with UTF-8 encoding.
sourceraw docstring

to-lisp-simple-strclj

(to-lisp-simple-str v)

abc/ip_address --> ip-address

abc/ip_address --> ip-address
sourceraw docstring

to-lisp-slashed-strclj

(to-lisp-slashed-str v)

ip_address_is --> ip/address-is

ip_address_is --> ip/address-is
sourceraw docstring

to-lisp-strclj

(to-lisp-str v)

ip_address --> ip-address

ip_address --> ip-address
sourceraw docstring

to-lisp-str-replace-firstclj

(to-lisp-str-replace-first v c r)

ipCaddress_to --> ipRaddress-to

ipCaddress_to --> ipRaddress-to
sourceraw docstring

to-longclj

(to-long s default)
source

to-snake-simple-strclj

(to-snake-simple-str v)

abc/ip-address --> ip_address

abc/ip-address --> ip_address
sourceraw docstring

to-snake-slashed-strclj

(to-snake-slashed-str v)

ip-address-is --> ip/address_is

ip-address-is --> ip/address_is
sourceraw docstring

to-snake-strclj

(to-snake-str v)

ip-address --> ip_address

ip-address --> ip_address
sourceraw docstring

to-snake-str-replace-firstclj

(to-snake-str-replace-first v c r)

ipCaddress-to --> ipRaddress_to

ipCaddress-to --> ipRaddress_to
sourceraw docstring

to-uuidclj

(to-uuid)
(to-uuid s)

Converts the given value to UUID. If it's empty or nil, returns nil.

Converts the given value to UUID. If it's empty or `nil`, returns `nil`.
sourceraw docstring

try-nullcljmacro

(try-null & body)

Evaluates body and if NullPointerException exception is caught it returns nil. Otherwise it returns the value of last expression in the body.

Evaluates body and if NullPointerException exception is caught it returns
nil. Otherwise it returns the value of last expression in the body.
sourceraw docstring

try-requireclj

(try-require n)

Tries to require namespace n and returns the given argument. If the file does not exists, returns nil.

Tries to require namespace `n` and returns the given argument. If the file does not
exists, returns `nil`.
sourceraw docstring

uuidclj

source

valuablecljmacro

(valuable & more)
source

valuable?clj

(valuable? x)

Returns true if x valuable: is not nil nor empty.

Returns `true` if `x` valuable: is not `nil` nor empty.
sourceraw docstring

when-not-emptycljmacro

(when-not-empty val & body)

Evaluates body when the given value is a non-empty collection.

Evaluates body when the given value is a non-empty collection.
sourceraw docstring

when-not-valuablecljmacro

(when-not-valuable v & more)

Evaluates expressions from more in an implicit do when v is nil or empty.

Evaluates expressions from `more` in an implicit `do` when `v` is `nil` or
empty.
sourceraw docstring

when-valuablecljmacro

(when-valuable v & more)

Evaluates expressions from more in an implicit do when v is not nil nor empty.

Evaluates expressions from `more` in an implicit `do` when `v` is not `nil` nor
empty.
sourceraw docstring

with-not-emptyclj

(with-not-empty obj)

Returns the collection if it's not empty. Otherwise returns nil.

Returns the collection if it's not empty. Otherwise returns `nil`.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close