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 [< >].
(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