(blank? s)
Checks if a string is empty or contains only whitespaces.
Checks if a string is empty or contains only whitespaces.
(camelize s)
Converts a string from selector-case to camelCase.
Converts a string from selector-case to camelCase.
(capitalize s)
Converts first letter of the string to uppercase.
Converts first letter of the string to uppercase.
(chars s)
Split a string in a seq of chars.
Split a string in a seq of chars.
(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.
(clean s)
Trim and replace multiple spaces with a single space.
Trim and replace multiple spaces with a single space.
(collapse-whitespace s)
Converts all adjacent whitespace characters to a single space.
Converts all adjacent whitespace characters to a single space.
(contains? s subs)
Determines whether a string contains a substring.
Determines whether a string contains a substring.
(dasherize s)
Converts a underscored or camelized string into an dasherized one.
Converts a underscored or camelized string into an dasherized one.
(empty? s)
Checks if a string is empty or contains only whitespaces.
Checks if a string is empty or contains only whitespaces.
Checks if a string is empty.
Checks if a string is empty.
(ends-with? s suffix)
Check if the string ends with suffix.
Check if the string ends with suffix.
(escape-regexp s)
Java specific pattern quoting.
Java specific pattern quoting.
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.
(format s & args)
Simple string interpolation.
Simple string interpolation.
(humanize s)
Converts an underscored, camelized, or dasherized string into a humanized one.
Converts an underscored, camelized, or dasherized string into a humanized one.
(ireplace s match replacement)
Replaces all instance of match with replacement in s.
Replaces all instance of match with replacement in s.
(ireplace-first s match replacement)
Replaces first instance of match with replacement in s.
Replaces first instance of match with replacement in s.
(join coll)
(join separator coll)
Joins strings together with given separator.
Joins strings together with given separator.
(lines s)
Return a list of the lines in the string.
Return a list of the lines in the string.
(lower s)
Converts string to all lower-case.
Converts string to all lower-case.
(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.
(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.
(parse-double s)
Return the double value from string.
Return the double value from string.
(parse-float s)
(parse-float s precision)
Return the float value, wraps parseFloat.
Return the float value, wraps parseFloat.
(parse-int s)
Return the number value in integer form.
Return the number value in integer form.
(parse-long s)
Return the long value from string.
Return the long value from string.
(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.
(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.
(quote s)
(quote s qchar)
Quotes a string.
Quotes a string.
(repeat s)
(repeat s n)
Repeats string n times.
Repeats string n times.
(replace s match replacement)
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"
Replaces all instance of match with replacement in s.
Replaces all instance of match with replacement in s.
(replace-first s match replacement)
Replaces first instance of match with replacement in s.
Replaces first instance of match with replacement in s.
(reverse s)
Return string reversed.
Return string reversed.
(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.
(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.
(slugify s)
Transform text into a URL slug.
Transform text into a URL slug.
(split s)
(split s sep)
(split s sep num)
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.
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.
(starts-with? s prefix)
Check if the string starts with prefix.
Check if the string starts with prefix.
(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.
(strip-prefix s prefix)
Strip prefix in more efficient way.
Strip prefix in more efficient way.
(strip-suffix s prefix)
Strip suffix in more efficient way.
Strip suffix in more efficient way.
(strip-tags s)
(strip-tags s tags)
(strip-tags s tags mapping)
Remove html tags from string.
Remove html tags from string.
(surround s wrap)
Surround a string with another string.
Surround a string with another string.
(titleize s & [delimeters])
(titleize s)
(titleize s delimiters)
Converts a string into TitleCase.
Converts a string into TitleCase.
(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.
(underscored s)
Converts a camelized or dasherized string into an underscored one.
Converts a camelized or dasherized string into an underscored one.
(unescape-html s)
Converts entity characters to HTML equivalents.
Converts entity characters to HTML equivalents.
(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).
(unquote s)
(unquote s qchar)
Unquote a string.
Unquote a string.
(unsurround s surrounding)
Unsurround a string surrounded by another.
Unsurround a string surrounded by another.
(upper s)
Converts string to all upper-case.
Converts string to all upper-case.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close