Utilities for pretty-printing abbreviated Clojure forms
Utilities for pretty-printing abbreviated Clojure forms
(edges coll)
Return left and right edges of a collection (eg. brackets plus prefixes), defaults to [< >].
Return left and right edges of a collection (eg. brackets plus prefixes), defaults to [< >].
(pr-str-truncated n & objs)
Like pr, but truncates output at n characters. Use for efficient printing where you don't want to pay the cost of printing the (possibly large) data structure.
Like pr, but truncates output at n characters. Use for efficient printing where you don't want to pay the cost of printing the (possibly large) data structure.
(pr-str-with-opts objs opts)
Prints a sequence of objects to a string, observing all the options given in opts
Prints a sequence of objects to a string, observing all the options given in opts
(pretty-condensed form)
(pretty-condensed depth enter-pred max-depth form)
Render form in abbreviated form, showing content only for keywords/strings/symbols and entering collections to a depth of 1.
Render form in abbreviated form, showing content only for keywords/strings/symbols and entering collections to a depth of 1.
(truncate-named n named)
Truncates named
, which must satisfy INamed protocol, to within n
characters, cutting from beginning. Adds a …
prefix to indicate where
cutting has occurred.
Truncates `named`, which must satisfy INamed protocol, to within `n` characters, cutting from beginning. Adds a `…` prefix to indicate where cutting has occurred.
(truncate-segments s limit)
(truncate-segments s limit match trunc-prefix)
(truncate-string n string)
(truncate-string n cut-from string)
Truncate a string to length n
.
Removal occurs at cut-from
, which may be :start, :end, or :middle.
Truncation is indicated by …
at start/end, or ...
at middle, for readability.
Truncate a string to length `n`. Removal occurs at `cut-from`, which may be :start, :end, or :middle. Truncation is indicated by `…` at start/end, or `...` at middle, for readability.
(with-edges coll value)
Wrap value
with edges of coll
Wrap `value` with edges of `coll`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close