Liking cljdoc? Tell your friends :D

utilis.string


collapse-whitespaceclj/s

(collapse-whitespace s)

Replaces a trimmed version of 's' with all consecutive runs of whitespace characters replaced with a single space.

Replaces a trimmed version of 's' with all consecutive runs of whitespace
characters replaced with a single space.
raw docstring

ensure-ends-withclj/s

(ensure-ends-with s suffix)

Add 'suffix' to 's' if 's' does not already end with 'suffix'

Add 'suffix' to 's' if 's' does not already end with 'suffix'
raw docstring

ensure-starts-withclj/s

(ensure-starts-with s prefix)

Add 'prefix' to 's' if 's' does not already start with 'prefix'

Add 'prefix' to 's' if 's' does not already start with 'prefix'
raw docstring

formatclj/s


numeric?clj/s

(numeric? s)

Returns a boolean indicating whether 's' represents a numeric value

Returns a boolean indicating whether 's' represents a numeric value
raw docstring

splitclj

(split s re & {:keys [quote-chars]})

Splits a string 's' on the regular expression 're'. Optional :quote-chars can be provided to avoid splitting the string within quoted sections.

Splits a string 's' on the regular expression 're'. Optional
:quote-chars can be provided to avoid splitting the string within
quoted sections.
raw docstring

split-atclj/s

(split-at s ind)

Splits a string into 2 at the given index. If the index is negative, it is split from the end of the string.

Splits a string into 2 at the given index.  If the index is negative,
it is split from the end of the string.
raw docstring

subsclj/s

(subs s start)
(subs s start end)

Returns the same substring as clojure.core/subs, additionally allows for start and/or end to be negative, in which case the index is taken from the end of the string.

Returns the same substring as clojure.core/subs, additionally allows
for start and/or end to be negative, in which case the index is
taken from the end of the string.
raw docstring

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

× close