Liking cljdoc? Tell your friends :D

cuerdas.core


blank?clj/s

(blank? s)

Checks if a string is empty or contains only whitespaces.

Checks if a string is empty or contains only whitespaces.
source (clj)source (cljs)raw docstring

camelizeclj/s

(camelize s)

Converts a string from selector-case to camelCase.

Converts a string from selector-case to camelCase.
source (clj)source (cljs)raw docstring

capitalizeclj/s

(capitalize s)

Converts first letter of the string to uppercase.

Converts first letter of the string to uppercase.
source (clj)source (cljs)raw docstring

charsclj/s

(chars s)

Split a string in a seq of chars.

Split a string in a seq of chars.
source (clj)source (cljs)raw docstring

classifyclj/s

(classify s)

Converts string to camelized class name. First letter is always upper case.

Converts string to camelized class name. First letter is always upper case.
source (clj)source (cljs)raw docstring

cleanclj/s

(clean s)

Trim and replace multiple spaces with a single space.

Trim and replace multiple spaces with
a single space.
source (clj)source (cljs)raw docstring

collapse-whitespaceclj/s

(collapse-whitespace s)

Converts all adjacent whitespace characters to a single space.

Converts all adjacent whitespace characters
to a single space.
source (clj)source (cljs)raw docstring

contains?clj/s

(contains? s subs)

Determines whether a string contains a substring.

Determines whether a string contains a substring.
source (clj)source (cljs)raw docstring

dasherizeclj/s

(dasherize s)

Converts a underscored or camelized string into an dasherized one.

Converts a underscored or camelized string
into an dasherized one.
source (clj)source (cljs)raw docstring

empty?clj/s≠

(empty? s)
clj

Checks if a string is empty or contains only whitespaces.

Checks if a string is empty or contains only whitespaces.
cljs

Checks if a string is empty.

Checks if a string is empty.
source (clj)source (cljs)raw docstring

ends-with?clj/s

(ends-with? s suffix)

Check if the string ends with suffix.

Check if the string ends with suffix.
source (clj)source (cljs)raw docstring

escape-htmlcljs

(escape-html s)
source

escape-regexpclj/s≠

(escape-regexp s)
clj

Java specific pattern quoting.

Java specific pattern quoting.
cljs

Escapes characters in the string that are not safe to use in a RegExp.

Escapes characters in the string that are not safe
to use in a RegExp.
source (clj)source (cljs)raw docstring

formatclj/s

(format s & args)

Simple string interpolation.

Simple string interpolation.
source (clj)source (cljs)raw docstring

html-escape-charscljs

source

humanizeclj/s

(humanize s)

Converts an underscored, camelized, or dasherized string into a humanized one.

Converts an underscored, camelized, or
dasherized string into a humanized one.
source (clj)source (cljs)raw docstring

ireplacecljs

(ireplace s match replacement)

Replaces all instance of match with replacement in s.

Replaces all instance of match with replacement in s.
sourceraw docstring

ireplace-firstcljs

(ireplace-first s match replacement)

Replaces first instance of match with replacement in s.

Replaces first instance of match with replacement in s.
sourceraw docstring

joinclj/s

(join coll)
(join separator coll)

Joins strings together with given separator.

Joins strings together with given separator.
source (clj)source (cljs)raw docstring

linesclj/s

(lines s)

Return a list of the lines in the string.

Return a list of the lines in the string.
source (clj)source (cljs)raw docstring

lowerclj/s

(lower s)

Converts string to all lower-case.

Converts string to all lower-case.
source (clj)source (cljs)raw docstring

ltrimclj/s

(ltrim s)
(ltrim s chs)

Removes whitespace or specified characters from left side of string.

Removes whitespace or specified characters
from left side of string.
source (clj)source (cljs)raw docstring

padclj/s

(pad s & [{:keys [length padding type] :or {length 0 padding " " type :left}}])

Pads the str with characters until the total string length is equal to the passed length parameter. By default, pads on the left with the space char.

Pads the str with characters until the total string
length is equal to the passed length parameter. By
default, pads on the left with the space char.
source (clj)source (cljs)raw docstring

parse-doubleclj

(parse-double s)

Return the double value from string.

Return the double value from string.
sourceraw docstring

parse-floatcljs

(parse-float s)
(parse-float s precision)

Return the float value, wraps parseFloat.

Return the float value, wraps parseFloat.
sourceraw docstring

parse-intcljs

(parse-int s)

Return the number value in integer form.

Return the number value in integer form.
sourceraw docstring

parse-longclj

(parse-long s)

Return the long value from string.

Return the long value from string.
sourceraw docstring

parse-numbercljs

(parse-number s)
(parse-number s precision)

General purpose function for parse number like string to number. It works with both: integers and floats.

General purpose function for parse number like
string to number. It works with both: integers
and floats.
sourceraw docstring

pruneclj/s

(prune s num)
(prune s num subs)

Truncates a string to a certain length and adds '...' if necessary.

Truncates a string to a certain length and adds '...'
if necessary.
source (clj)source (cljs)raw docstring

quoteclj/s

(quote s)
(quote s qchar)

Quotes a string.

Quotes a string.
source (clj)source (cljs)raw docstring

repeatclj/s

(repeat s)
(repeat s n)

Repeats string n times.

Repeats string n times.
source (clj)source (cljs)raw docstring

replaceclj/s≠

(replace s match replacement)
clj

Replaces all instance of match with replacement in s.

The replacement is literal (i.e. none of its characters are treated specially) for all cases above except pattern / string.

In match is pattern instance, replacement can contain $1, $2, etc. will be substituted with string that matcher the corresponding parenthesized group in pattern.

If you wish your replacement string to be used literary, use (escape-regexp replacement).

Example: (replace "Almost Pig Latin" #"\b(\w)(\w+)\b" "$2$1ay") ;; => "lmostAay igPay atinLay"

Replaces all instance of match with replacement in s.

The replacement is literal (i.e. none of its characters are treated
specially) for all cases above except pattern / string.

In match is pattern instance, replacement can contain $1, $2, etc.
will be substituted with string that matcher the corresponding
parenthesized group in pattern.

If you wish your replacement string to be used literary,
use `(escape-regexp replacement)`.

Example:
  (replace "Almost Pig Latin" #"\b(\w)(\w+)\b" "$2$1ay")
  ;; => "lmostAay igPay atinLay"
cljs

Replaces all instance of match with replacement in s.

Replaces all instance of match with replacement in s.
source (clj)source (cljs)raw docstring

replace-firstclj/s

(replace-first s match replacement)

Replaces first instance of match with replacement in s.

Replaces first instance of match with replacement in s.
source (clj)source (cljs)raw docstring

reverseclj/s

(reverse s)

Return string reversed.

Return string reversed.
source (clj)source (cljs)raw docstring

reversed-html-escape-charscljs

source

rtrimclj/s

(rtrim s)
(rtrim s chs)

Removes whitespace or specified characters from right side of string.

Removes whitespace or specified characters
from right side of string.
source (clj)source (cljs)raw docstring

sliceclj/s

(slice s begin)
(slice s begin end)

Extracts a section of a string and returns a new string.

Extracts a section of a string and returns a new string.
source (clj)source (cljs)raw docstring

slugifyclj/s

(slugify s)

Transform text into a URL slug.

Transform text into a URL slug.
source (clj)source (cljs)raw docstring

splitclj/s≠

(split s)
(split s sep)
(split s sep num)
clj

Splits a string on a separator a limited number of times. The separator can be a string or Pattern instance.

Splits a string on a separator a limited
number of times. The separator can be a string
or Pattern instance.
cljs

Splits a string on a separator a limited number of times. The separator can be a string or RegExp instance.

Splits a string on a separator a limited
number of times. The separator can be a string
or RegExp instance.
source (clj)source (cljs)raw docstring

starts-with?clj/s

(starts-with? s prefix)

Check if the string starts with prefix.

Check if the string starts with prefix.
source (clj)source (cljs)raw docstring

strip-newlinesclj/s

(strip-newlines s)

Takes a string and replaces newlines with a space. Multiple lines are replaced with a single space.

Takes a string and replaces newlines with a space.
Multiple lines are replaced with a single space.
source (clj)source (cljs)raw docstring

strip-prefixclj/s

(strip-prefix s prefix)

Strip prefix in more efficient way.

Strip prefix in more efficient way.
source (clj)source (cljs)raw docstring

strip-suffixclj/s

(strip-suffix s prefix)

Strip suffix in more efficient way.

Strip suffix in more efficient way.
source (clj)source (cljs)raw docstring

strip-tagsclj/s

(strip-tags s)
(strip-tags s tags)
(strip-tags s tags mapping)

Remove html tags from string.

Remove html tags from string.
source (clj)source (cljs)raw docstring

surroundclj/s

(surround s wrap)

Surround a string with another string.

Surround a string with another string.
source (clj)source (cljs)raw docstring

titleizeclj/s≠

clj
(titleize s & [delimeters])
cljs
(titleize s)
(titleize s delimiters)

Converts a string into TitleCase.

Converts a string into TitleCase.
source (clj)source (cljs)raw docstring

trimclj/s

(trim s)
(trim s chs)

Removes whitespace or specified characters from both ends of string.

Removes whitespace or specified characters
from both ends of string.
source (clj)source (cljs)raw docstring

underscoredclj/s

(underscored s)

Converts a camelized or dasherized string into an underscored one.

Converts a camelized or dasherized string
into an underscored one.
source (clj)source (cljs)raw docstring

unescape-htmlcljs

(unescape-html s)

Converts entity characters to HTML equivalents.

Converts entity characters to HTML equivalents.
sourceraw docstring

unlinesclj/s

(unlines s)

Returns a new string joining a list of strings with a newline char (\n).

Returns a new string joining a list of strings with a newline char (\n).
source (clj)source (cljs)raw docstring

unquoteclj/s

(unquote s)
(unquote s qchar)

Unquote a string.

Unquote a string.
source (clj)source (cljs)raw docstring

unsurroundclj/s

(unsurround s surrounding)

Unsurround a string surrounded by another.

Unsurround a string surrounded by another.
source (clj)source (cljs)raw docstring

upperclj/s

(upper s)

Converts string to all upper-case.

Converts string to all upper-case.
source (clj)source (cljs)raw docstring

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

× close