(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.
(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'
(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'
(numeric? s)
Returns a boolean indicating whether 's' represents a numeric value
Returns a boolean indicating whether 's' represents a numeric value
(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.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close