Pure text helpers for the digest, over hive-system.pattern. Every pattern is named here once; call sites name what they look for.
Pure text helpers for the digest, over hive-system.pattern. Every pattern is named here once; call sites name what they look for.
(excise id s with)s with every match of id replaced by with.
`s` with every match of `id` replaced by `with`.
(groups id s)Capture groups of the first match of id in s, or nil.
Capture groups of the first match of `id` in `s`, or nil.
(matches id s)Every match of pattern id in s, as hive-system Match maps.
Every match of pattern `id` in `s`, as hive-system Match maps.
(register!)Register the digest's patterns. Idempotent (keyed by id); runs on load.
Register the digest's patterns. Idempotent (keyed by id); runs on load.
(squash s)Collapse whitespace runs to one space and trim. Blank -> nil.
Collapse whitespace runs to one space and trim. Blank -> nil.
(strip-html s)HTML fragment -> plain text on one line, or nil.
HTML fragment -> plain text on one line, or nil.
(truncate s n)At most n characters, cut at a word boundary, with an ellipsis.
At most `n` characters, cut at a word boundary, with an ellipsis.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |