Skip to main content

Strings

  • char

    Coerce to char

  • format

    Formats a string using java.lang.String.format, see java.util.Formatter for format string syntax

  • keyword

    Returns a Keyword with the given namespace and name. Do not use : in the keyword strings, it will be added automatica...

  • name

    Returns the name String of a string, symbol or keyword.

  • parse-boolean

    Parse strings "true" or "false" and return a boolean, or nil if invalid

  • parse-double

    Parse string with floating point components and return a Double value, or nil if parse fails. Grammar: https://docs...

  • parse-long

    Parse string of decimal digits with optional leading -/+ and return a Long value, or nil if parse fails

  • parse-uuid

    Parse a string representing a UUID and return a java.util.UUID instance, or nil if parse fails. Grammar: https://do...

  • str

    With no args, returns the empty string. With one arg x, returns x.toString(). (str nil) returns the empty string. Wit...

  • symbol

    Returns a Symbol with the given namespace and name. Arity-1 works on strings, keywords, and vars.

  • blank?

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

  • capitalize

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

  • ends-with?

    True if s ends with substr.

  • escape

    Return a new string, using cmap to escape each character ch from s as follows: If (cmap ch) is nil, append ch ...

  • includes?

    True if s includes substr.

  • index-of

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

  • join

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

  • last-index-of

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

  • lower-case

    Converts string to all lower-case.

  • re-quote-replacement

    Given a replacement string that you wish to be a literal replacement for a pattern match in replace or replace-first,...

  • replace

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

  • replace-first

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

  • reverse

    Returns s with its characters reversed.

  • split

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

  • split-lines

    Splits s on \n or \r\n. Trailing empty lines are not returned.

  • starts-with?

    True if s starts with substr.

  • subs

    Returns the substring of s beginning at start inclusive, and ending at end (defaults to length of string), exclusive.

  • trim

    Removes whitespace from both ends of string.

  • trim-newline

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

  • triml

    Removes whitespace from the left side of string.

  • trimr

    Removes whitespace from the right side of string.

  • upper-case

    Converts string to all upper-case.

  • string?

    Return true if x is a String

  • re-find

    Returns the next regex match, if any, of string to pattern, using java.util.regex.Matcher.find(). Uses re-groups to r...

  • re-groups

    Returns the groups from the most recent match/find. If there are no nested groups, returns a string of the entire matc...

  • re-matcher

    Returns an instance of java.util.regex.Matcher, for use, e.g. in re-find.

  • re-matches

    Returns the match, if any, of string to pattern, using java.util.regex.Matcher.matches(). Uses re-groups to return th...

  • re-pattern

    Returns an instance of java.util.regex.Pattern, for use, e.g. in re-matcher.

  • re-seq

    Returns a lazy sequence of successive matches of pattern in string, using java.util.regex.Matcher.find(), each such ma...