-
Notifications
You must be signed in to change notification settings - Fork 0
/
io.randomseed.utils.html
91 lines (91 loc) · 75.8 KB
/
io.randomseed.utils.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>io.randomseed.utils documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script><link rel="stylesheet" type="text/css" href="css/randomseed.css" /></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Random:utils</span> <span class="project-version">1.2.34</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="10_introduction.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>io</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>randomseed</span></div></div></li><li class="depth-3 current"><a href="io.randomseed.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.bot.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bot</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.bus.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bus</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.crypto.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crypto</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.db.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.fs.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>fs</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.ip.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ip</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.log.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>log</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.map.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>map</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.nop-cache.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>nop-cache</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reitit</span></div></div></li><li class="depth-5"><a href="io.randomseed.utils.reitit.http.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>http</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.set.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>set</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.validators.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validators</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.validators.common.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>common</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.var.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>var</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.vec.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>vec</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="io.randomseed.utils.html#var-add-spc-b"><div class="inner"><span>add-spc-b</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-add-spc-l"><div class="inner"><span>add-spc-l</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-add-spc-r"><div class="inner"><span>add-spc-r</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-ask"><div class="inner"><span>ask</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-atom.3F"><div class="inner"><span>atom?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-b64-to-bytes"><div class="inner"><span>b64-to-bytes</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-bytes-concat"><div class="inner"><span>bytes-concat</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-bytes-to-string"><div class="inner"><span>bytes-to-string</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-bzero"><div class="inner"><span>bzero</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-char-ranges-.3Eset"><div class="inner"><span>char-ranges->set</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-const-form.3F"><div class="inner"><span>const-form?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-contains-some.3F"><div class="inner"><span>contains-some?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-count-digits"><div class="inner"><span>count-digits</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-current-thread"><div class="inner"><span>current-thread</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-current-thread-id"><div class="inner"><span>current-thread-id</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-current-thread-name"><div class="inner"><span>current-thread-name</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-defdoc.21"><div class="inner"><span>defdoc!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-empty-ident.3F"><div class="inner"><span>empty-ident?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-empty-string.3F"><div class="inner"><span>empty-string?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-ensure-ident-keyword"><div class="inner"><span>ensure-ident-keyword</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-ensure-keyword"><div class="inner"><span>ensure-keyword</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-ensure-keyword-having-ns"><div class="inner"><span>ensure-keyword-having-ns</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-ensure-namespaced-keyword"><div class="inner"><span>ensure-namespaced-keyword</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-ensure-ns"><div class="inner"><span>ensure-ns</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-ensure-str"><div class="inner"><span>ensure-str</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-exception.3F"><div class="inner"><span>exception?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-find-first"><div class="inner"><span>find-first</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-fn-name"><div class="inner"><span>fn-name</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-gen-digits"><div class="inner"><span>gen-digits</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-get-rand-int"><div class="inner"><span>get-rand-int</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-inferred-contains.3F"><div class="inner"><span>inferred-contains?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-inferred-get"><div class="inner"><span>inferred-get</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-insert-at"><div class="inner"><span>insert-at</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-instant.3F"><div class="inner"><span>instant?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-is"><div class="inner"><span>is</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-is-not"><div class="inner"><span>is-not</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-juxt-seq"><div class="inner"><span>juxt-seq</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-lazy-iterator-seq"><div class="inner"><span>lazy-iterator-seq</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-mapply"><div class="inner"><span>mapply</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-must-have-ns"><div class="inner"><span>must-have-ns</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-named-to-str"><div class="inner"><span>named-to-str</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-named-to-str-trim"><div class="inner"><span>named-to-str-trim</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-nil-or-empty-str.3F"><div class="inner"><span>nil-or-empty-str?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-nil-spc-or-empty-str"><div class="inner"><span>nil-spc-or-empty-str</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-nil-spc-or-empty-str.3F"><div class="inner"><span>nil-spc-or-empty-str?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-normalize-name"><div class="inner"><span>normalize-name</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-normalize-name-with-ns"><div class="inner"><span>normalize-name-with-ns</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-normalize-to-bytes"><div class="inner"><span>normalize-to-bytes</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-not-empty-ident.3F"><div class="inner"><span>not-empty-ident?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-not-empty-string.3F"><div class="inner"><span>not-empty-string?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-not-valuable"><div class="inner"><span>not-valuable</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-not-valuable.3F"><div class="inner"><span>not-valuable?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-ns-infer"><div class="inner"><span>ns-infer</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-or-some"><div class="inner"><span>or-some</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-parse-long"><div class="inner"><span>parse-long</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-parse-num"><div class="inner"><span>parse-num</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-parse-percent"><div class="inner"><span>parse-percent</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-parse-re"><div class="inner"><span>parse-re</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-parse-url"><div class="inner"><span>parse-url</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-percent"><div class="inner"><span>percent</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-pos-val"><div class="inner"><span>pos-val</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-qsome"><div class="inner"><span>qsome</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-qstrb"><div class="inner"><span>qstrb</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-random-digits-len"><div class="inner"><span>random-digits-len</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-random-uuid"><div class="inner"><span>random-uuid</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-read-line-with-prompt"><div class="inner"><span>read-line-with-prompt</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-replace-first"><div class="inner"><span>replace-first</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-safe-parse-long"><div class="inner"><span>safe-parse-long</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-safe-parse-num"><div class="inner"><span>safe-parse-num</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-safe-parse-percent"><div class="inner"><span>safe-parse-percent</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-sanitize-base-url"><div class="inner"><span>sanitize-base-url</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-simple-keyword-up"><div class="inner"><span>simple-keyword-up</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-simple-quote-form.3F"><div class="inner"><span>simple-quote-form?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-simple-symbol-up"><div class="inner"><span>simple-symbol-up</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-some-fn*"><div class="inner"><span>some-fn*</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-some-keyword"><div class="inner"><span>some-keyword</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-some-keyword-simple"><div class="inner"><span>some-keyword-simple</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-some-keyword-up"><div class="inner"><span>some-keyword-up</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-some-long"><div class="inner"><span>some-long</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-some-str"><div class="inner"><span>some-str</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-some-str-down"><div class="inner"><span>some-str-down</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-some-str-simple"><div class="inner"><span>some-str-simple</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-some-str-simple-down"><div class="inner"><span>some-str-simple-down</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-some-str-simple-up"><div class="inner"><span>some-str-simple-up</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-some-str-spc"><div class="inner"><span>some-str-spc</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-some-str-squeeze-spc"><div class="inner"><span>some-str-squeeze-spc</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-some-str-up"><div class="inner"><span>some-str-up</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-some-string"><div class="inner"><span>some-string</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-some-symbol"><div class="inner"><span>some-symbol</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-some-symbol-simple"><div class="inner"><span>some-symbol-simple</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-some-symbol-up"><div class="inner"><span>some-symbol-up</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-str-spc"><div class="inner"><span>str-spc</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-str-squeeze-spc"><div class="inner"><span>str-squeeze-spc</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-strb"><div class="inner"><span>strb</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-strs"><div class="inner"><span>strs</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-strs-simple"><div class="inner"><span>strs-simple</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-strspc"><div class="inner"><span>strspc</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-strspc-squeezed"><div class="inner"><span>strspc-squeezed</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-text-to-bytes"><div class="inner"><span>text-to-bytes</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-throwable.3F"><div class="inner"><span>throwable?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-to-bytes"><div class="inner"><span>to-bytes</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-to-lisp-simple-str"><div class="inner"><span>to-lisp-simple-str</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-to-lisp-slashed-str"><div class="inner"><span>to-lisp-slashed-str</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-to-lisp-str"><div class="inner"><span>to-lisp-str</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-to-lisp-str-replace-first"><div class="inner"><span>to-lisp-str-replace-first</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-to-long"><div class="inner"><span>to-long</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-to-snake-simple-str"><div class="inner"><span>to-snake-simple-str</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-to-snake-slashed-str"><div class="inner"><span>to-snake-slashed-str</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-to-snake-str"><div class="inner"><span>to-snake-str</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-to-snake-str-replace-first"><div class="inner"><span>to-snake-str-replace-first</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-to-uuid"><div class="inner"><span>to-uuid</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-try-null"><div class="inner"><span>try-null</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-try-require"><div class="inner"><span>try-require</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-uuid"><div class="inner"><span>uuid</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-valuable"><div class="inner"><span>valuable</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-valuable.3F"><div class="inner"><span>valuable?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-when-not-empty"><div class="inner"><span>when-not-empty</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-when-not-valuable"><div class="inner"><span>when-not-valuable</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-when-valuable"><div class="inner"><span>when-valuable</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.html#var-with-not-empty"><div class="inner"><span>with-not-empty</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">io.randomseed.utils</h1><h4 class="added">added in 1.0.0</h4><div class="doc"><div class="markdown"><p>Random support functions and macros.</p>
</div></div><div class="public anchor" id="var-add-spc-b"><h3>add-spc-b</h3><div class="usage"><code>(add-spc-b s)</code></div><div class="doc"><div class="markdown"><p>Adds space characters to the beginning and end of the given string <code>s</code> if it is not an empty string. Otherwise it returns a string with a single space.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L399">view source</a></div></div><div class="public anchor" id="var-add-spc-l"><h3>add-spc-l</h3><div class="usage"><code>(add-spc-l s)</code></div><div class="doc"><div class="markdown"><p>Prepends space character to the given string <code>s</code> if it is not an empty string.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L388">view source</a></div></div><div class="public anchor" id="var-add-spc-r"><h3>add-spc-r</h3><div class="usage"><code>(add-spc-r s)</code></div><div class="doc"><div class="markdown"><p>Appends space character to the given string <code>s</code> if it is not an empty string or a single space.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L393">view source</a></div></div><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"><code>(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}})</code></div><div class="doc"><div class="markdown"><p>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: <code>prompt</code> (message displayed when asking for first string), <code>confirm-prompt</code> (message displayed when asking for the same string again), <code>not-match-msg</code> (message displayed when strings do not match), <code>empty-msg</code> (message displayed when the entered string is empty), <code>retries</code> (number of retries before quitting the loop; when set to <code>nil</code> or not given, it will continue indefinitely), <code>confirmation?</code> (requires string to be re-entered for confirmation, defaults to <code>true</code>), <code>allow-empty?</code> (allows the entered string to be empty; defaults to <code>false</code>), <code>empty-nil?</code> (returns <code>nil</code> instead of an empty string; defaults to <code>false</code>), <code>empty-quits?</code> (short-circuits on any empty string and returns <code>nil</code>; defaults to <code>false</code>), <code>empty-quits-nil?</code> (returns <code>nil</code> when quitting on empty string; defaults to <code>true</code>). Returns the entered string or <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1244">view source</a></div></div><div class="public anchor" id="var-atom.3F"><h3>atom?</h3><div class="usage"><code>(atom? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L59">view source</a></div></div><div class="public anchor" id="var-b64-to-bytes"><h3>b64-to-bytes</h3><div class="usage"><code>(b64-to-bytes s)</code></div><div class="doc"><div class="markdown"><p>Converts Base64 encoded string to array of bytes.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L657">view source</a></div></div><div class="public anchor" id="var-bytes-concat"><h3>bytes-concat</h3><div class="usage"><code>(bytes-concat)</code><code>(bytes-concat bary)</code><code>(bytes-concat bary & byte-arys)</code></div><div class="doc"><div class="markdown"><p>Concatenates byte arrays.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L677">view source</a></div></div><div class="public anchor" id="var-bytes-to-string"><h3>bytes-to-string</h3><div class="usage"><code>(bytes-to-string b)</code></div><div class="doc"><div class="markdown"><p>Converts bytes into a string</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L671">view source</a></div></div><div class="public anchor" id="var-bzero"><h3>bzero</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Returns zeroed array of bytes.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L667">view source</a></div></div><div class="public anchor" id="var-char-ranges-.3Eset"><h3>char-ranges->set</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(char-ranges->set & ranges)</code></div><div class="doc"><div class="markdown"><p>Returns a set of characters defined as a collection of collections with start and stop character, e.g.: <a href="\0 \9">\A \Z</a></p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L981">view source</a></div></div><div class="public anchor" id="var-const-form.3F"><h3>const-form?</h3><div class="usage"><code>(const-form? x)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> when <code>x</code> is <code>nil</code> or is of one of the following types: string or keyword or boolean or number or character. Otherwise returns <code>false</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L281">view source</a></div></div><div class="public anchor" id="var-contains-some.3F"><h3>contains-some?</h3><div class="usage"><code>(contains-some? s1 s2)</code></div><div class="doc"><div class="markdown"><p>Takes two indexed collections and returns true if at least one element is shared in both. Otherwise it returns false.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1027">view source</a></div></div><div class="public anchor" id="var-count-digits"><h3>count-digits</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(count-digits n)</code></div><div class="doc"><div class="markdown"><p>Returns a number of digits in a decimal number <code>n</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L973">view source</a></div></div><div class="public anchor" id="var-current-thread"><h3>current-thread</h3><div class="usage"><code>(current-thread)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L914">view source</a></div></div><div class="public anchor" id="var-current-thread-id"><h3>current-thread-id</h3><div class="usage"><code>(current-thread-id)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L912">view source</a></div></div><div class="public anchor" id="var-current-thread-name"><h3>current-thread-name</h3><div class="usage"><code>(current-thread-name)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L913">view source</a></div></div><div class="public anchor" id="var-defdoc.21"><h3>defdoc!</h3><h4 class="type">macro</h4><div class="usage"><code>(defdoc! v docstr)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1296">view source</a></div></div><div class="public anchor" id="var-empty-ident.3F"><h3>empty-ident?</h3><div class="usage"><code>(empty-ident? v)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> if <code>v</code> is an empty identifier.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L78">view source</a></div></div><div class="public anchor" id="var-empty-string.3F"><h3>empty-string?</h3><div class="usage"><code>(empty-string? s)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> if <code>s</code> is an empty string. Will throw an exception when <code>s</code> is not a string.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L66">view source</a></div></div><div class="public anchor" id="var-ensure-ident-keyword"><h3>ensure-ident-keyword</h3><div class="usage"><code>(ensure-ident-keyword id)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L740">view source</a></div></div><div class="public anchor" id="var-ensure-keyword"><h3>ensure-keyword</h3><div class="usage"><code>(ensure-keyword id)</code></div><div class="doc"><div class="markdown"><p>Takes an identifier <code>id</code> and tries to convert it to a keyword. If it is not an identifier, it calls <code>keyword</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L727">view source</a></div></div><div class="public anchor" id="var-ensure-keyword-having-ns"><h3>ensure-keyword-having-ns</h3><div class="usage"><code>(ensure-keyword-having-ns id ns)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L744">view source</a></div></div><div class="public anchor" id="var-ensure-namespaced-keyword"><h3>ensure-namespaced-keyword</h3><div class="usage"><code>(ensure-namespaced-keyword id ns)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L748">view source</a></div></div><div class="public anchor" id="var-ensure-ns"><h3>ensure-ns</h3><div class="usage"><code>(ensure-ns id ns)</code></div><div class="doc"><div class="markdown"><p>Takes an identifier <code>id</code> and a namespace <code>ns</code> (a string), and tries to set a namespace in the identifier. If a namespace already exists in identifier, it is not changed.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L716">view source</a></div></div><div class="public anchor" id="var-ensure-str"><h3>ensure-str</h3><div class="usage"><code>(ensure-str v)</code><code>(ensure-str v & more)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L710">view source</a></div></div><div class="public anchor" id="var-exception.3F"><h3>exception?</h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L61">view source</a></div></div><div class="public anchor" id="var-find-first"><h3>find-first</h3><div class="usage"><code>(find-first f coll)</code><code>(find-first f coll not-found)</code></div><div class="doc"><div class="markdown"><p>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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1015">view source</a></div></div><div class="public anchor" id="var-fn-name"><h3>fn-name</h3><div class="usage"><code>(fn-name f)</code></div><div class="doc"><div class="markdown"><p>Tries to obtain symbolic function name for the given function <code>f</code>. Uses metadata and Java reflection as fallback.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1208">view source</a></div></div><div class="public anchor" id="var-gen-digits"><h3>gen-digits</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(gen-digits num)</code><code>(gen-digits num rng)</code></div><div class="doc"><div class="markdown"><p>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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L957">view source</a></div></div><div class="public anchor" id="var-get-rand-int"><h3>get-rand-int</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(get-rand-int n)</code><code>(get-rand-int n rng)</code></div><div class="doc"><div class="markdown"><p>Like rand-int but optionally uses random number generator.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L918">view source</a></div></div><div class="public anchor" id="var-inferred-contains.3F"><h3>inferred-contains?</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(inferred-contains? coll k)</code></div><div class="doc"><div class="markdown"><p>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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L884">view source</a></div></div><div class="public anchor" id="var-inferred-get"><h3>inferred-get</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(inferred-get coll k)</code><code>(inferred-get coll k default)</code></div><div class="doc"><div class="markdown"><p>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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L895">view source</a></div></div><div class="public anchor" id="var-insert-at"><h3>insert-at</h3><div class="usage"><code>(insert-at index coll element)</code></div><div class="doc"><div class="markdown"><p>Takes an index number <code>index</code>, a collection <code>coll</code> and an element <code>element</code>, and inserts element’s value under the given index number. Uses sequential operations: <code>split-at</code>, <code>concat</code> and <code>cons</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1007">view source</a></div></div><div class="public anchor" id="var-instant.3F"><h3>instant?</h3><div class="usage"><code>(instant? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L60">view source</a></div></div><div class="public anchor" id="var-is"><h3>is</h3><h4 class="type">macro</h4><div class="usage"><code>(is pred val & body)</code></div><div class="doc"><div class="markdown"><p>Takes a predicate <code>pred</code>, a value <code>val</code> and a body. Evaluates <code>val</code> and passes to <code>pred</code>. If the result is truthy it evaluates all expressions from body in an implicit <code>do</code>. Otherwise it returns the value.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L775">view source</a></div></div><div class="public anchor" id="var-is-not"><h3>is-not</h3><h4 class="type">macro</h4><div class="usage"><code>(is-not pred val & body)</code></div><div class="doc"><div class="markdown"><p>Takes a predicate <code>pred</code>, a value <code>val</code> and a body. Evaluates <code>val</code> and passes to <code>pred</code>. If the result is truthy it returns the value. Otherwise it evaluates all expressions from body in an implicit <code>do</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L783">view source</a></div></div><div class="public anchor" id="var-juxt-seq"><h3>juxt-seq</h3><div class="usage"><code>(juxt-seq & functions)</code></div><div class="doc"><div class="markdown"><p>Like <code>clojure.core/juxt</code> but produces lazy sequence of results instead of a vector.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1001">view source</a></div></div><div class="public anchor" id="var-lazy-iterator-seq"><h3>lazy-iterator-seq</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(lazy-iterator-seq coll)</code><code>(lazy-iterator-seq coll iter)</code></div><div class="doc"><div class="markdown"><p>Returns a lazy sequence as an interface to the given iterable Java object.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L990">view source</a></div></div><div class="public anchor" id="var-mapply"><h3>mapply</h3><div class="usage"><code>(mapply f & args)</code></div><div class="doc"><div class="markdown"><p>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.</p>
<p>Returns the result of calling f.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1223">view source</a></div></div><div class="public anchor" id="var-must-have-ns"><h3>must-have-ns</h3><div class="usage"><code>(must-have-ns id ns)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L702">view source</a></div></div><div class="public anchor" id="var-named-to-str"><h3>named-to-str</h3><div class="usage"><code>(named-to-str v)</code></div><div class="doc"><div class="markdown"><p>Converts a value <code>v</code> to a string. If keyword is given, it will have <code>:</code> character removed.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L314">view source</a></div></div><div class="public anchor" id="var-named-to-str-trim"><h3>named-to-str-trim</h3><div class="usage"><code>(named-to-str-trim v)</code></div><div class="doc"><div class="markdown"><p>Converts a value <code>v</code> to a string and trims its both sides. If keyword is given, it will have <code>:</code> character removed.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L320">view source</a></div></div><div class="public anchor" id="var-nil-or-empty-str.3F"><h3>nil-or-empty-str?</h3><div class="usage"><code>(nil-or-empty-str? x)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> if the given <code>x</code> is <code>nil</code> or an empty string.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L309">view source</a></div></div><div class="public anchor" id="var-nil-spc-or-empty-str"><h3>nil-spc-or-empty-str</h3><div class="usage"><code>(nil-spc-or-empty-str s)</code></div><div class="doc"><div class="markdown"><p>Takes a string or <code>nil</code> object <code>s</code> and returns an empty string if it is <code>nil</code>, empty string or a string containing a single space only.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L405">view source</a></div></div><div class="public anchor" id="var-nil-spc-or-empty-str.3F"><h3>nil-spc-or-empty-str?</h3><div class="usage"><code>(nil-spc-or-empty-str? s)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> if the given value <code>s</code> is <code>nil</code>, an empty string or a string containing a single space only.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L411">view source</a></div></div><div class="public anchor" id="var-normalize-name"><h3>normalize-name</h3><div class="usage"><code>(normalize-name some-name)</code><code>(normalize-name some-name default-name)</code></div><div class="doc"><div class="markdown"><p>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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L625">view source</a></div></div><div class="public anchor" id="var-normalize-name-with-ns"><h3>normalize-name-with-ns</h3><div class="usage"><code>(normalize-name-with-ns some-name)</code><code>(normalize-name-with-ns some-name default-name)</code></div><div class="doc"><div class="markdown"><p>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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L639">view source</a></div></div><div class="public anchor" id="var-normalize-to-bytes"><h3>normalize-to-bytes</h3><div class="usage"><code>(normalize-to-bytes t)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L696">view source</a></div></div><div class="public anchor" id="var-not-empty-ident.3F"><h3>not-empty-ident?</h3><div class="usage"><code>(not-empty-ident? v)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> if <code>v</code> is not an empty identifier.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L84">view source</a></div></div><div class="public anchor" id="var-not-empty-string.3F"><h3>not-empty-string?</h3><div class="usage"><code>(not-empty-string? s)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> if <code>s</code> is not an empty string. Will throw an exception when <code>s</code> is not a string.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L72">view source</a></div></div><div class="public anchor" id="var-not-valuable"><h3>not-valuable</h3><h4 class="type">macro</h4><div class="usage"><code>(not-valuable & more)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L130">view source</a></div></div><div class="public anchor" id="var-not-valuable.3F"><h3>not-valuable?</h3><div class="usage"><code>(not-valuable? x)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> if <code>x</code> not valuable: is <code>nil</code> or empty.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L90">view source</a></div></div><div class="public anchor" id="var-ns-infer"><h3>ns-infer</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(ns-infer ns-name k)</code><code>(ns-infer ns-name k use-infer)</code></div><div class="doc"><div class="markdown"><p>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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L869">view source</a></div></div><div class="public anchor" id="var-or-some"><h3>or-some</h3><h4 class="type">macro</h4><div class="usage"><code>(or-some)</code><code>(or-some x)</code><code>(or-some x & next)</code></div><div class="doc"><div class="markdown"><p>Same as <code>or</code> but returns first value which is strictly not <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L791">view source</a></div></div><div class="public anchor" id="var-parse-long"><h3>parse-long</h3><div class="usage"><code>(parse-long s)</code><code>(parse-long s default)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1106">view source</a></div></div><div class="public anchor" id="var-parse-num"><h3>parse-num</h3><div class="usage"><code>(parse-num n default)</code><code>(parse-num n)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1088">view source</a></div></div><div class="public anchor" id="var-parse-percent"><h3>parse-percent</h3><div class="usage"><code>(parse-percent n default)</code><code>(parse-percent n)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1129">view source</a></div></div><div class="public anchor" id="var-parse-re"><h3>parse-re</h3><div class="usage"><code>(parse-re v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1144">view source</a></div></div><div class="public anchor" id="var-parse-url"><h3>parse-url</h3><div class="usage"><code>(parse-url u)</code></div><div class="doc"><div class="markdown"><p>Parses URL into a map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1064">view source</a></div></div><div class="public anchor" id="var-percent"><h3>percent</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1135">view source</a></div></div><div class="public anchor" id="var-pos-val"><h3>pos-val</h3><div class="usage"><code>(pos-val x)</code></div><div class="doc"><div class="markdown"><p>Returns the given value <code>x</code> if it is a positive number. Otherwise it returns <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1083">view source</a></div></div><div class="public anchor" id="var-qsome"><h3>qsome</h3><h4 class="type">macro</h4><div class="usage"><code>(qsome pred coll)</code></div><div class="doc"><div class="markdown"><p>Same as <code>clojure.core/some</code> but when <code>coll</code> is a constant form then a source code with <code>or</code> expression is generated instead of <code>some</code> with recurrent predicate application. Short-circuits when <code>pred</code> is <code>nil</code> or <code>false</code>, returning <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L799">view source</a></div></div><div class="public anchor" id="var-qstrb"><h3>qstrb</h3><h4 class="type">macro</h4><div class="usage"><code>(qstrb)</code><code>(qstrb a)</code><code>(qstrb a & more)</code></div><div class="doc"><div class="markdown"><p>Calls <code>strb</code> but checks if the first and only argument is a string, and if it so, returns its literal form without calling <code>strb</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L302">view source</a></div></div><div class="public anchor" id="var-random-digits-len"><h3>random-digits-len</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(random-digits-len x iteration shrink-now)</code><code>(random-digits-len x iteration shrink-now rng)</code></div><div class="doc"><div class="markdown"><p>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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L930">view source</a></div></div><div class="public anchor" id="var-random-uuid"><h3>random-uuid</h3><div class="usage"><code>(random-uuid)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1038">view source</a></div></div><div class="public anchor" id="var-read-line-with-prompt"><h3>read-line-with-prompt</h3><div class="usage"><code>(read-line-with-prompt)</code><code>(read-line-with-prompt prompt)</code></div><div class="doc"><div class="markdown"><p>Reads a line of text from console with optional prompt. Returns a string or <code>nil</code> when the entered string is empty.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1234">view source</a></div></div><div class="public anchor" id="var-replace-first"><h3>replace-first</h3><div class="usage"><code>(replace-first s c r)</code></div><div class="doc"><div class="markdown"><p>Replaces the first appearance of a character <code>c</code> in the given string <code>s</code> with a character <code>r</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L565">view source</a></div></div><div class="public anchor" id="var-safe-parse-long"><h3>safe-parse-long</h3><div class="usage"><code>(safe-parse-long v default)</code><code>(safe-parse-long v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1117">view source</a></div></div><div class="public anchor" id="var-safe-parse-num"><h3>safe-parse-num</h3><div class="usage"><code>(safe-parse-num v default)</code><code>(safe-parse-num v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1110">view source</a></div></div><div class="public anchor" id="var-safe-parse-percent"><h3>safe-parse-percent</h3><div class="usage"><code>(safe-parse-percent v default)</code><code>(safe-parse-percent v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1137">view source</a></div></div><div class="public anchor" id="var-sanitize-base-url"><h3>sanitize-base-url</h3><div class="usage"><code>(sanitize-base-url url)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1056">view source</a></div></div><div class="public anchor" id="var-simple-keyword-up"><h3>simple-keyword-up</h3><div class="usage"><code>(simple-keyword-up v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1168">view source</a></div></div><div class="public anchor" id="var-simple-quote-form.3F"><h3>simple-quote-form?</h3><div class="usage"><code>(simple-quote-form? x)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> when <code>x</code> is a list or is an instance of <code>clojure.lang.Cons</code>, has 2 elements or less and its first element is the <code>quote</code> symbol, plus its second element is a symbol or <code>const-form?</code> returns <code>true</code> for it.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L292">view source</a></div></div><div class="public anchor" id="var-simple-symbol-up"><h3>simple-symbol-up</h3><div class="usage"><code>(simple-symbol-up v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1191">view source</a></div></div><div class="public anchor" id="var-some-fn*"><h3>some-fn*</h3><div class="usage"><code>(some-fn* p)</code><code>(some-fn* p1 p2)</code><code>(some-fn* p1 p2 p3)</code><code>(some-fn* p1 p2 p3 p4)</code><code>(some-fn* p1 p2 p3 p4 & preds)</code></div><div class="doc"><div class="markdown"><p>Same as <code>clojure.core/some-fn</code> but multiple arguments are passed to each predicate function and nullary variant is not returning <code>nil</code> but calls each predicate without passing any arguments.</p>
<p>Takes a set of predicates and returns a function that returns the first truthy value (not <code>nil</code> and not <code>false</code>) 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 <code>false</code> or <code>nil</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L810">view source</a></div></div><div class="public anchor" id="var-some-keyword"><h3>some-keyword</h3><div class="usage"><code>(some-keyword v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1150">view source</a></div></div><div class="public anchor" id="var-some-keyword-simple"><h3>some-keyword-simple</h3><div class="usage"><code>(some-keyword-simple v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1163">view source</a></div></div><div class="public anchor" id="var-some-keyword-up"><h3>some-keyword-up</h3><div class="usage"><code>(some-keyword-up v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1156">view source</a></div></div><div class="public anchor" id="var-some-long"><h3>some-long</h3><div class="usage"><code>(some-long s default)</code><code>(some-long s)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1098">view source</a></div></div><div class="public anchor" id="var-some-str"><h3>some-str</h3><div class="usage"><code>(some-str v)</code></div><div class="doc"><div class="markdown"><p>Converts the given value <code>v</code> to a string. Keywords are transformed to strings without the <code>:</code> prefix. Empty string or <code>nil</code> will result in <code>nil</code> being returned.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L138">view source</a></div></div><div class="public anchor" id="var-some-str-down"><h3>some-str-down</h3><div class="usage"><code>(some-str-down v)</code></div><div class="doc"><div class="markdown"><p>Converts the given value <code>v</code> to a lowercase string. Keywords are transformed to strings without the <code>:</code> prefix. Empty string or <code>nil</code> will result in <code>nil</code> being returned.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L158">view source</a></div></div><div class="public anchor" id="var-some-str-simple"><h3>some-str-simple</h3><div class="usage"><code>(some-str-simple v)</code></div><div class="doc"><div class="markdown"><p>Converts the given value <code>v</code> to a string. If <code>v</code> is an identifier only its name part is used and namespace is ignored. Keywords are transformed to strings without the <code>:</code> prefix. Empty string or <code>nil</code> will result in <code>nil</code> being returned.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L166">view source</a></div></div><div class="public anchor" id="var-some-str-simple-down"><h3>some-str-simple-down</h3><div class="usage"><code>(some-str-simple-down v)</code></div><div class="doc"><div class="markdown"><p>Converts the given value <code>v</code> to a lowercase string. If <code>v</code> is an identifier only its name part is used and namespace is ignored. Keywords are transformed to strings without the <code>:</code> prefix. Empty string or <code>nil</code> will result in <code>nil</code> being returned.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L182">view source</a></div></div><div class="public anchor" id="var-some-str-simple-up"><h3>some-str-simple-up</h3><div class="usage"><code>(some-str-simple-up v)</code></div><div class="doc"><div class="markdown"><p>Converts the given value <code>v</code> to an uppercase string. If <code>v</code> is an identifier only its name part is used and namespace is ignored. Keywords are transformed to strings without the <code>:</code> prefix. Empty string or <code>nil</code> will result in <code>nil</code> being returned.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L174">view source</a></div></div><div class="public anchor" id="var-some-str-spc"><h3>some-str-spc</h3><div class="usage"><code>(some-str-spc s & more)</code></div><div class="doc"><div class="markdown"><p>Takes one or more strings or other objects convertable to strings and concatenates them with spaces. Keywords are transformed to strings without the <code>:</code> prefix.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L208">view source</a></div></div><div class="public anchor" id="var-some-str-squeeze-spc"><h3>some-str-squeeze-spc</h3><div class="usage"><code>(some-str-squeeze-spc s & more)</code></div><div class="doc"><div class="markdown"><p>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 <code>:</code> prefix.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L216">view source</a></div></div><div class="public anchor" id="var-some-str-up"><h3>some-str-up</h3><div class="usage"><code>(some-str-up v)</code></div><div class="doc"><div class="markdown"><p>Converts the given value <code>v</code> to an uppercase string. Keywords are transformed to strings without the <code>:</code> prefix. Empty string or <code>nil</code> will result in <code>nil</code> being returned.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L150">view source</a></div></div><div class="public anchor" id="var-some-string"><h3>some-string</h3><div class="usage"><code>(some-string s)</code></div><div class="doc"><div class="markdown"><p>Takes a string <code>s</code> and returns it unless its value is <code>nil</code> or it is an empty string. A bit more performant but will throw an exception when <code>s</code> is not a string nor <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L226">view source</a></div></div><div class="public anchor" id="var-some-symbol"><h3>some-symbol</h3><div class="usage"><code>(some-symbol v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1173">view source</a></div></div><div class="public anchor" id="var-some-symbol-simple"><h3>some-symbol-simple</h3><div class="usage"><code>(some-symbol-simple v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1186">view source</a></div></div><div class="public anchor" id="var-some-symbol-up"><h3>some-symbol-up</h3><div class="usage"><code>(some-symbol-up v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1179">view source</a></div></div><div class="public anchor" id="var-str-spc"><h3>str-spc</h3><div class="usage"><code>(str-spc s & more)</code></div><div class="doc"><div class="markdown"><p>Takes one or more strings or other objects convertable to strings and concatenates them with spaces.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L190">view source</a></div></div><div class="public anchor" id="var-str-squeeze-spc"><h3>str-squeeze-spc</h3><div class="usage"><code>(str-squeeze-spc s & more)</code></div><div class="doc"><div class="markdown"><p>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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L198">view source</a></div></div><div class="public anchor" id="var-strb"><h3>strb</h3><div class="usage"><code>(strb a)</code><code>(strb a b)</code><code>(strb a b c)</code><code>(strb a b c d)</code><code>(strb a b c d e)</code><code>(strb a b c d e & more)</code></div><div class="doc"><div class="markdown"><p>Like <code>clojure.core/str</code> but faster. Be aware that all arguments except first must be of type <code>String</code> or <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L233">view source</a></div></div><div class="public anchor" id="var-strs"><h3>strs</h3><h4 class="type">macro</h4><div class="usage"><code>(strs)</code><code>(strs a)</code><code>(strs a & more)</code></div><div class="doc"><div class="markdown"><p>Converts all arguments to strings and concatenates them with keywords being converted to strings without the <code>:</code> prefix. Neighbouring literal strings and known constant forms will be concatenated at compile time.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L463">view source</a></div></div><div class="public anchor" id="var-strs-simple"><h3>strs-simple</h3><h4 class="type">macro</h4><div class="usage"><code>(strs-simple)</code><code>(strs-simple a)</code><code>(strs-simple a & more)</code></div><div class="doc"><div class="markdown"><p>Converts all arguments to strings and concatenates them. Neighbouring literal strings and known constant forms will be concatenated at compile time.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L442">view source</a></div></div><div class="public anchor" id="var-strspc"><h3>strspc</h3><h4 class="type">macro</h4><div class="usage"><code>(strspc)</code><code>(strspc a)</code><code>(strspc a & more)</code></div><div class="doc"><div class="markdown"><p>Converts all arguments to strings and concatenates them with keywords being converted to strings without the <code>:</code> prefix. Neighbouring literal strings and known constant forms will be trimmed on both ends and concatenated at compile time with space characters.</p>
<p>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).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L486">view source</a></div></div><div class="public anchor" id="var-strspc-squeezed"><h3>strspc-squeezed</h3><h4 class="type">macro</h4><div class="usage"><code>(strspc-squeezed)</code><code>(strspc-squeezed a)</code><code>(strspc-squeezed a & more)</code></div><div class="doc"><div class="markdown"><p>Converts all arguments to strings and concatenates them with keywords being converted to strings without the <code>:</code> prefix. Neighbouring literal strings and known constant forms will be trimmed on both ends and concatenated at compile time with space characters.</p>
<p>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).</p>
<p>Moreover, spaces will be squeezed for detected constant forms at compile time. No squeezing will be performed at run-time.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L523">view source</a></div></div><div class="public anchor" id="var-text-to-bytes"><h3>text-to-bytes</h3><div class="usage"><code>(text-to-bytes t)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L692">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3>throwable?</h3><div class="usage"><code>(throwable? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L62">view source</a></div></div><div class="public anchor" id="var-to-bytes"><h3>to-bytes</h3><div class="usage"><code>(to-bytes obj)</code></div><div class="doc"><div class="markdown"><p>Converts object to bytes by converting it to a string first with UTF-8 encoding.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L662">view source</a></div></div><div class="public anchor" id="var-to-lisp-simple-str"><h3>to-lisp-simple-str</h3><div class="usage"><code>(to-lisp-simple-str v)</code></div><div class="doc"><div class="markdown"><p>abc/ip_address –> ip-address</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L585">view source</a></div></div><div class="public anchor" id="var-to-lisp-slashed-str"><h3>to-lisp-slashed-str</h3><div class="usage"><code>(to-lisp-slashed-str v)</code></div><div class="doc"><div class="markdown"><p>ip_address_is –> ip/address-is</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L596">view source</a></div></div><div class="public anchor" id="var-to-lisp-str"><h3>to-lisp-str</h3><div class="usage"><code>(to-lisp-str v)</code></div><div class="doc"><div class="markdown"><p>ip_address –> ip-address</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L579">view source</a></div></div><div class="public anchor" id="var-to-lisp-str-replace-first"><h3>to-lisp-str-replace-first</h3><div class="usage"><code>(to-lisp-str-replace-first v c r)</code></div><div class="doc"><div class="markdown"><p>ipCaddress_to –> ipRaddress-to</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L590">view source</a></div></div><div class="public anchor" id="var-to-long"><h3>to-long</h3><div class="usage"><code>(to-long s default)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1124">view source</a></div></div><div class="public anchor" id="var-to-snake-simple-str"><h3>to-snake-simple-str</h3><div class="usage"><code>(to-snake-simple-str v)</code></div><div class="doc"><div class="markdown"><p>abc/ip-address –> ip_address</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L607">view source</a></div></div><div class="public anchor" id="var-to-snake-slashed-str"><h3>to-snake-slashed-str</h3><div class="usage"><code>(to-snake-slashed-str v)</code></div><div class="doc"><div class="markdown"><p>ip-address-is –> ip/address_is</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L618">view source</a></div></div><div class="public anchor" id="var-to-snake-str"><h3>to-snake-str</h3><div class="usage"><code>(to-snake-str v)</code></div><div class="doc"><div class="markdown"><p>ip-address –> ip_address</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L601">view source</a></div></div><div class="public anchor" id="var-to-snake-str-replace-first"><h3>to-snake-str-replace-first</h3><div class="usage"><code>(to-snake-str-replace-first v c r)</code></div><div class="doc"><div class="markdown"><p>ipCaddress-to –> ipRaddress_to</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L612">view source</a></div></div><div class="public anchor" id="var-to-uuid"><h3>to-uuid</h3><div class="usage"><code>(to-uuid)</code><code>(to-uuid s)</code></div><div class="doc"><div class="markdown"><p>Converts the given value to UUID. If it’s empty or <code>nil</code>, returns <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1043">view source</a></div></div><div class="public anchor" id="var-try-null"><h3>try-null</h3><h4 class="type">macro</h4><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(try-null & body)</code></div><div class="doc"><div class="markdown"><p>Evaluates body and if NullPointerException exception is caught it returns nil. Otherwise it returns the value of last expression in the body.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L754">view source</a></div></div><div class="public anchor" id="var-try-require"><h3>try-require</h3><div class="usage"><code>(try-require n)</code></div><div class="doc"><div class="markdown"><p>Tries to require namespace <code>n</code> and returns the given argument. If the file does not exists, returns <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1198">view source</a></div></div><div class="public anchor" id="var-uuid"><h3>uuid</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L1050">view source</a></div></div><div class="public anchor" id="var-valuable"><h3>valuable</h3><h4 class="type">macro</h4><div class="usage"><code>(valuable & more)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L124">view source</a></div></div><div class="public anchor" id="var-valuable.3F"><h3>valuable?</h3><div class="usage"><code>(valuable? x)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> if <code>x</code> valuable: is not <code>nil</code> nor empty.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L100">view source</a></div></div><div class="public anchor" id="var-when-not-empty"><h3>when-not-empty</h3><h4 class="type">macro</h4><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(when-not-empty val & body)</code></div><div class="doc"><div class="markdown"><p>Evaluates body when the given value is a non-empty collection.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L762">view source</a></div></div><div class="public anchor" id="var-when-not-valuable"><h3>when-not-valuable</h3><h4 class="type">macro</h4><div class="usage"><code>(when-not-valuable v & more)</code></div><div class="doc"><div class="markdown"><p>Evaluates expressions from <code>more</code> in an implicit <code>do</code> when <code>v</code> is <code>nil</code> or empty.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L117">view source</a></div></div><div class="public anchor" id="var-when-valuable"><h3>when-valuable</h3><h4 class="type">macro</h4><div class="usage"><code>(when-valuable v & more)</code></div><div class="doc"><div class="markdown"><p>Evaluates expressions from <code>more</code> in an implicit <code>do</code> when <code>v</code> is not <code>nil</code> nor empty.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L110">view source</a></div></div><div class="public anchor" id="var-with-not-empty"><h3>with-not-empty</h3><h4 class="added">added in 1.0.0</h4><div class="usage"><code>(with-not-empty obj)</code></div><div class="doc"><div class="markdown"><p>Returns the collection if it’s not empty. Otherwise returns <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils.clj#L769">view source</a></div></div></div></body></html>