### Functions on strings
(adjust direction n s)
Left or right-adjust a string.
Left or right-adjust a string.
(format-code code)
Returns a string as formatted by clojure.pprint/code-dispatch
.
Returns a string as formatted by `clojure.pprint/code-dispatch`.
(join-lines lines)
Glues strings together with newlines.
Glues strings together with newlines.
(join-words words)
Glues strings together with spaces.
Glues strings together with spaces.
(lines s)
Splits a string around newlines.
Splits a string around newlines.
(no-print & body)
Binds out to an anonymous writer used as /dev/null and returns the value of the last expr in body.
Binds *out* to an anonymous writer used as /dev/null and returns the value of the last expr in body.
(tabulate s pad)
Left-pad a string with pad
, taking newlines into account.
Left-pad a string with `pad`, taking newlines into account.
(truncate s length)
(truncate s length pad)
Truncate a string with pad
beyond a certain length. By default,
pad
is "..."
.
Truncate a string with `pad` beyond a certain length. By default, `pad` is `"..."`.
(words s)
Splits a string around whitespaces.
Splits a string around whitespaces.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close