Liking cljdoc? Tell your friends :D

cljmd.util


balanced-unescaped-reclj

(balanced-unescaped-re opener closer)
(balanced-unescaped-re opener closer {:keys [intersect]})
source

bounded-matchesclj

(bounded-matches re s)

Returns a vector of hashes, each of which contains:

  • the RE match, i.e. the output of (re-find re s)
  • the start index (include) of re in s
  • the end index (exclusive) of re in s
Returns a vector of hashes, each of which contains:
* the RE match, i.e. the output of (re-find re s)
* the start index (include) of re in s
* the end index (exclusive) of re in s
sourceraw docstring

but-unescaped-reclj

(but-unescaped-re & cs)

Returns a RE which matches any character except the ones given. The last argument may be an options hash. Valid options are :allow and :exclude.

:allow is expected to be one or more character classes to match. When omitted, all characters except the arguments are matched.

:exclude is expected to be one or more character classes to not match. When omitted, only the arguments are forbidden to match. Providing a value here extends, not replaces, the blocklist.

Returns a RE which matches any character except the ones given. The last
argument may be an options hash. Valid options are :allow and :exclude.

  :allow is expected to be one or more character classes to match. When
  omitted, all characters except the arguments are matched.

  :exclude is expected to be one or more character classes to not match.
  When omitted, only the arguments are forbidden to match. Providing a value
  here extends, not replaces, the blocklist.
sourceraw docstring

clusterclj

(cluster pred coll)

Groups items in coll for which (pred acc x) returns true, where acc is the accumulated collection of clusters and x is the current item. Returns a vector of vectors.

Groups items in coll for which (pred acc x) returns true, where acc is the
accumulated collection of clusters and x is the current item.
Returns a vector of vectors.
sourceraw docstring

coalesceclj

(coalesce pred rf coll)

Clusters items in coll with pred, then reduces over them with rf.

Clusters items in coll with pred, then reduces over them with rf.
sourceraw docstring

collapse-whitespaceclj

(collapse-whitespace string)

Replace consecutive whitespace characters with a single space.

Replace consecutive whitespace characters with a single space.
sourceraw docstring

escape-re-delimiterclj

(escape-re-delimiter in)
source

excluding-reclj

(excluding-re re)
(excluding-re re limit)

Returns a negative lookbehind RE which forbids match immediately prior to match the given regular expression.

Returns a negative lookbehind RE which forbids match immediately prior to
match the given regular expression.
sourceraw docstring

expand-tabclj

(expand-tab s)
(expand-tab s {:keys [tabstop limit] :or {tabstop tabstop}})

Expands a maximum of :limit tab characters to the :tabstop value. If :limit is not provided, expands all.

Expands a maximum of :limit tab characters to the :tabstop value. If :limit
is not provided, expands all.
sourceraw docstring

graphclj

(graph pred coll)

Hashmap of items x and y in coll for which (pred x y) is true. The key is x and the associated value is a sequence of all y.

Hashmap of items x and y in coll for which (pred x y) is true. The key is x
and the associated value is a sequence of all y.
sourceraw docstring

source

or-reclj

(or-re & exps)

Returns a RE which matches any of the given expressions.

Returns a RE which matches any of the given expressions.
sourceraw docstring

percent-encode-uriclj

(percent-encode-uri uri)

Percent-encodes the path and query string, if any, of uri.

Percent-encodes the path and query string, if any, of uri.
sourceraw docstring

re-delimiter-escape-hashclj

source

tabstopclj

Number of spaces to expand tabs to.

Number of spaces to expand tabs to.
sourceraw docstring

trim-leading-whitespaceclj

(trim-leading-whitespace s n)

Removes whitespace from the beginning of string s. Tabs are expanded as needed before processing.

Removes whitespace from the beginning of string s. Tabs are expanded as
needed before processing.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close