Liking cljdoc? Tell your friends :D

clojure.string


blank?cljs

(blank? s)

True is s is nil, empty, or contains only whitespace.

True is s is nil, empty, or contains only whitespace.
sourceraw docstring

capitalizecljs

(capitalize s)

Converts first character of the string to upper-case, all other characters to lower-case.

Converts first character of the string to upper-case, all other
characters to lower-case.
sourceraw docstring

ends-with?cljs

(ends-with? s substr)

True if s ends with substr.

True if s ends with substr.
sourceraw docstring

escapecljs

(escape s cmap)

Return a new string, using cmap to escape each character ch from s as follows:

If (cmap ch) is nil, append ch to the new string. If (cmap ch) is non-nil, append (str (cmap ch)) instead.

Return a new string, using cmap to escape each character ch
from s as follows:

If (cmap ch) is nil, append ch to the new string.
If (cmap ch) is non-nil, append (str (cmap ch)) instead.
sourceraw docstring

includes?cljs

(includes? s substr)

True if s includes substr.

True if s includes substr.
sourceraw docstring

index-ofcljs

(index-of s value)
(index-of s value from-index)

Return index of value (string or char) in s, optionally searching forward from from-index or nil if not found.

Return index of value (string or char) in s, optionally searching
forward from from-index or nil if not found.
sourceraw docstring

joincljs

(join coll)
(join separator coll)

Returns a string of all elements in coll, as returned by (seq coll), separated by an optional separator.

Returns a string of all elements in coll, as returned by (seq coll),
separated by an optional separator.
sourceraw docstring

last-index-ofcljs

(last-index-of s value)
(last-index-of s value from-index)

Return last index of value (string or char) in s, optionally searching backward from from-index or nil if not found.

Return last index of value (string or char) in s, optionally
searching backward from from-index or nil if not found.
sourceraw docstring

lower-casecljs

(lower-case s)

Converts string to all lower-case.

Converts string to all lower-case.
sourceraw docstring

replacecljs

(replace s match replacement)

Replaces all instance of match with replacement in s. match/replacement can be:

string / string pattern / (string or function of match).

Replaces all instance of match with replacement in s.
match/replacement can be:

string / string
pattern / (string or function of match).
sourceraw docstring

replace-firstcljs

(replace-first s match replacement)

Replaces the first instance of match with replacement in s. match/replacement can be:

string / string pattern / (string or function of match).

Replaces the first instance of match with replacement in s.
match/replacement can be:

string / string
pattern / (string or function of match).
sourceraw docstring

reversecljs

(reverse s)

Returns s with its characters reversed.

Returns s with its characters reversed.
sourceraw docstring

splitcljs

(split s re)
(split s re limit)

Splits string on a regular expression. Optional argument limit is the maximum number of splits. Not lazy. Returns vector of the splits.

Splits string on a regular expression. Optional argument limit is
the maximum number of splits. Not lazy. Returns vector of the splits.
sourceraw docstring

split-linescljs

(split-lines s)

Splits s on or .

Splits s on 
 or 
.
sourceraw docstring

starts-with?cljs

(starts-with? s substr)

True if s starts with substr.

True if s starts with substr.
sourceraw docstring

trimcljs

(trim s)

Removes whitespace from both ends of string.

Removes whitespace from both ends of string.
sourceraw docstring

trim-newlinecljs

(trim-newline s)

Removes all trailing newline \n or return \r characters from string. Similar to Perl's chomp.

Removes all trailing newline \n or return \r characters from
string.  Similar to Perl's chomp.
sourceraw docstring

trimlcljs

(triml s)

Removes whitespace from the left side of string.

Removes whitespace from the left side of string.
sourceraw docstring

trimrcljs

(trimr s)

Removes whitespace from the right side of string.

Removes whitespace from the right side of string.
sourceraw docstring

upper-casecljs

(upper-case s)

Converts string to all upper-case.

Converts string to all upper-case.
sourceraw docstring

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

× close