Liking cljdoc? Tell your friends :D

tupelo.string

A superset of clojure.string with many added functions.

A superset of `clojure.string` with many added functions.
raw docstring

->kabob-kwclj/s

(->kabob-kw arg)

Inputs: [arg :- (s/cond-pre s/Keyword s/Str s/Symbol)] Returns: s/Keyword

Inputs: [arg :- (s/cond-pre s/Keyword s/Str s/Symbol)]
Returns: s/Keyword
sourceraw docstring

->kabob-strclj/s

(->kabob-str arg)

Inputs: [arg :- (s/cond-pre s/Keyword s/Str s/Symbol)] Returns: s/Str

Coerce a string, keyword, or symbol to a kabob-case-string

Inputs: [arg :- (s/cond-pre s/Keyword s/Str s/Symbol)]
Returns: s/Str

Coerce a string, keyword, or symbol to a kabob-case-string
sourceraw docstring

->snake-kwclj/s

(->snake-kw arg)

Inputs: [arg :- (s/cond-pre s/Keyword s/Str s/Symbol)] Returns: s/Keyword

Inputs: [arg :- (s/cond-pre s/Keyword s/Str s/Symbol)]
Returns: s/Keyword
sourceraw docstring

->snake-strclj/s

(->snake-str arg)

Inputs: [arg :- (s/cond-pre s/Keyword s/Str s/Symbol)] Returns: s/Str

Coerce a string, keyword, or symbol to a snake_case_string

Inputs: [arg :- (s/cond-pre s/Keyword s/Str s/Symbol)]
Returns: s/Str

Coerce a string, keyword, or symbol to a snake_case_string
sourceraw docstring

alpha?clj/s

(alpha? & args)

Returns true iff every char passes tupelo.chars/alpha?

Returns true iff every char passes tupelo.chars/alpha?
sourceraw docstring

alphanumeric?clj/s

(alphanumeric? & args)

Returns true iff every char passes tupelo.chars/alphanumeric?

Returns true iff every char passes tupelo.chars/alphanumeric?
sourceraw docstring

blank?clj/s

Alias for clojure.string/blank?

Alias for clojure.string/blank?
sourceraw docstring

byte-array->strclj

(byte-array->str arg)

Converts a byte array to a String using the UTF-8 Charset

Converts a byte array to a String using the UTF-8 Charset
sourceraw docstring

capitalizeclj/s

Alias for clojure.string/capitalize

Alias for clojure.string/capitalize
sourceraw docstring

char->code-pointcljs

(char->code-point char-val)

REturns the code-point of a character (len=1 string)

REturns the code-point of a character (len=1 string)
sourceraw docstring

clipclj/s≠

clj
(clip nchars & args)
cljs
(clip G__45507 & rest45508)

Inputs: [nchars & args] Returns: s/Str

Converts all args to single string and clips any characters beyond nchars.

Inputs: [nchars & args]
Returns: s/Str

Converts all args to single string and clips any characters beyond nchars.
sourceraw docstring

clip-textclj/s

(clip-text N src-str)

Inputs: [N :- s/Int src-str :- s/Str] Returns: s/Str

Given a multi-line string, returns a string with each line clipped to a max of N chars

Inputs: [N :- s/Int src-str :- s/Str]
Returns: s/Str

Given a multi-line string, returns a string with each line clipped to a max of N chars 
sourceraw docstring

clojurize-keyclj/s

(clojurize-key arg)

Given a string or keyword, converts to lowercase and calls str->kw-normalized

Given a string or keyword, converts to lowercase and calls str->kw-normalized
sourceraw docstring

code-point->charcljs

(code-point->char code-point)

Inputs: [code-point :- s/Int]

REturns the code-point of a character (len=1 string)

Inputs: [code-point :- s/Int]

REturns the code-point of a character (len=1 string)
sourceraw docstring

collapse-whitespaceclj/sdeprecated

source

contains-match?clj/s

(contains-match? search-str re)

Inputs: [search-str :- s/Str re :- s/Any] Returns: s/Bool

Returns true if the regex matches any portion of the intput string.

Inputs: [search-str :- s/Str re :- s/Any]
Returns: s/Bool

Returns true if the regex matches any portion of the intput string.
sourceraw docstring

contains-str-frags?clj/s≠

clj
(contains-str-frags? src & frags)
cljs
(contains-str-frags? G__45599 & rest45600)

Inputs: [src :- s/Str & frags :- [s/Str]] Returns: s/Bool

Returns true if the intput string contains the target string fragments. Search fragments may be separated by zero-or-more arbitrary chars in src

Inputs: [src :- s/Str & frags :- [s/Str]]
Returns: s/Bool

Returns true if the intput string contains the target string fragments.
Search fragments may be separated by zero-or-more arbitrary chars in src
sourceraw docstring

contains-str?clj/s

(contains-str? search-str tgt-str)

Inputs: [search-str :- s/Str tgt-str :- s/Str] Returns: s/Bool

Returns true if the intput string contains the target string.

Inputs: [search-str :- s/Str tgt-str :- s/Str]
Returns: s/Bool

Returns true if the intput string contains the target string.
sourceraw docstring

digit?clj/s

(digit? & args)

Returns true iff every char passes tupelo.chars/digit?

Returns true iff every char passes tupelo.chars/digit?
sourceraw docstring

dropclj/s

(drop n txt)

Inputs: [n :- s/Int txt :- s/Str] Returns: s/Str

Drops the first N chars of a string, returning a string result.

Inputs: [n :- s/Int txt :- s/Str]
Returns: s/Str

Drops the first N chars of a string, returning a string result.
sourceraw docstring

ends-with?clj/s

Alias for clojure.string/ends-with?

Alias for clojure.string/ends-with?
sourceraw docstring

equals-ignore-spacing?clj/sdeprecated

(equals-ignore-spacing? & args)

Renamed => nonblank=

Renamed => `nonblank=` 
sourceraw docstring

escapeclj/s

Alias for clojure.string/escape

Alias for clojure.string/escape
sourceraw docstring

fgrepclj/s

(fgrep tgt text)

Inputs: [tgt :- s/Str text :- s/Str]

Given a multi-line text string, returns a string containing lines matching the target string.

Inputs: [tgt :- s/Str text :- s/Str]

Given a multi-line text string, returns a string containing lines matching the target string.
sourceraw docstring

formatclj/s≠

clj
(format fmtstr & args)
cljs
(format G__45649 & rest45650)

Inputs: [fmtstr :- s/Str & args] Returns: s/Str

Performs sprintf-like formatting for CLJ & CLJS:

   (format "%8.2f" 123.456789) => '  123.46'
Inputs: [fmtstr :- s/Str & args]
Returns: s/Str

Performs sprintf-like formatting for CLJ & CLJS:

       (format "%8.2f" 123.456789) => '  123.46'
sourceraw docstring

grepclj/s

(grep pattern text)

Inputs: [pattern :- s/Regex text :- s/Str]

Given a multi-line text string, returns a string containing lines matching a regex pattern.

Inputs: [pattern :- s/Regex text :- s/Str]

Given a multi-line text string, returns a string containing lines matching a regex pattern.
sourceraw docstring

hex?clj/s

(hex? & args)

Returns true iff every char passes tupelo.chars/hex?

Returns true iff every char passes tupelo.chars/hex?
sourceraw docstring

includes?clj/s

Alias for clojure.string/includes?

Alias for clojure.string/includes?
sourceraw docstring

increasing-or-equal?clj/s

(increasing-or-equal? a b)

Inputs: [a :- s/Str b :- s/Str] Returns: s/Bool

Returns true if a pair of strings are in increasing lexicographic order, or equal.

Inputs: [a :- s/Str b :- s/Str]
Returns: s/Bool

Returns true if a pair of strings are in increasing lexicographic order, or equal.
sourceraw docstring

increasing?clj/s

(increasing? a b)

Inputs: [a :- s/Str b :- s/Str] Returns: s/Bool

Returns true if a pair of strings are in increasing lexicographic order.

Inputs: [a :- s/Str b :- s/Str]
Returns: s/Bool

Returns true if a pair of strings are in increasing lexicographic order.
sourceraw docstring

indentclj/s

(indent n txt)

Inputs: [n :- s/Int txt :- s/Str] Returns: s/Str

Indents a string by pre-pending N spaces. Returns a string result.

Inputs: [n :- s/Int txt :- s/Str]
Returns: s/Str

Indents a string by pre-pending N spaces. Returns a string result.
sourceraw docstring

indent-linesclj/s

(indent-lines n txt)

Inputs: [n :- s/Int txt :- s/Str] Returns: s/Str

Splits out each line of txt using clojure.string/split-lines, then indents each line by prepending N spaces. Joins lines together into a single string result, with each line terminated by a single ewline.

Inputs: [n :- s/Int txt :- s/Str]
  Returns: s/Str

  Splits out each line of txt using clojure.string/split-lines, then
  indents each line by prepending N spaces. Joins lines together into
  a single string result, with each line terminated by a single 
ewline.
sourceraw docstring

indent-lines-withclj/s

(indent-lines-with indent-str txt)

Inputs: [indent-str :- s/Str txt :- s/Str] Returns: s/Str

Splits out each line of txt using clojure.string/split-lines, then indents each line by prepending it with the supplied string. Joins lines together into a single string result, with each line terminated by a single ewline.

Inputs: [indent-str :- s/Str txt :- s/Str]
  Returns: s/Str

  Splits out each line of txt using clojure.string/split-lines, then
  indents each line by prepending it with the supplied string. Joins lines together into
  a single string result, with each line terminated by a single 
ewline.
sourceraw docstring

index-ofclj/s

Alias for clojure.string/index-of

Alias for clojure.string/index-of
sourceraw docstring

joinclj/s

Alias for clojure.string/join

Alias for clojure.string/join
sourceraw docstring

last-index-ofclj/s

Alias for clojure.string/last-index-of

Alias for clojure.string/last-index-of
sourceraw docstring

lower-caseclj/s

Alias for clojure.string/lower-case

Alias for clojure.string/lower-case
sourceraw docstring

lowercase=clj/s≠

clj
(lowercase= & args)
cljs
(lowercase= & rest45485)

Inputs: [& args :- [s/Str]] Returns: s/Bool

Compares strings for equality after applying clojure.string/lower-case.

Inputs: [& args :- [s/Str]]
Returns: s/Bool

Compares strings for equality after applying clojure.string/lower-case. 
sourceraw docstring

lowercase?clj/s

(lowercase? & args)

Returns true iff every char passes tupelo.chars/lowercase?

Returns true iff every char passes tupelo.chars/lowercase?
sourceraw docstring

nonblank-lines=clj/s≠

clj
(nonblank-lines= & args)
cljs
(nonblank-lines= & rest45467)

Inputs: [& args :- [s/Str]] Returns: s/Bool

Compares corresponding lines of input strings for equality using tupelo.misc/collapse-whitespace.

Inputs: [& args :- [s/Str]]
Returns: s/Bool

Compares corresponding lines of input strings for equality using tupelo.misc/collapse-whitespace.
sourceraw docstring

nonblank=clj/s≠

clj
(nonblank= & args)
cljs
(nonblank= & rest45461)

Inputs: [& args :- [s/Str]] Returns: s/Bool

Compares strings for equality using tupelo.misc/collapse-whitespace. Equivalent to separating tokens by whitespace and comparing the resulting sequences.

Inputs: [& args :- [s/Str]]
Returns: s/Bool

Compares strings for equality using tupelo.misc/collapse-whitespace.
 Equivalent to separating tokens by whitespace and comparing the resulting sequences.
sourceraw docstring

normalize-strclj/s

(normalize-str str-in)

Returns a 'normalized' version of str-in, stripped of leading/trailing blanks, and with all non-alphanumeric chars converted to hyphens.

Returns a 'normalized' version of str-in, stripped of leading/trailing
blanks, and with all non-alphanumeric chars converted to hyphens.
sourceraw docstring

not-blank?clj/s

(not-blank? it)

Returns true if the string is not blank.

Returns true if the string is not blank.
sourceraw docstring

pad-leftclj/s≠

clj
(pad-left str-val N)
(pad-left str-val N pad-char)
cljs
(pad-left G__45621 G__45622)
(pad-left G__45626 G__45627 G__45628)

Inputs: ([str-val :- s/Str N :- s/Int] [str-val :- s/Str N :- s/Int pad-char]) Returns: s/Str

Pads a string on the left until it is at least N chars in size

Inputs: ([str-val :- s/Str N :- s/Int] [str-val :- s/Str N :- s/Int pad-char])
Returns: s/Str

Pads a string on the left until it is at least N chars in size
sourceraw docstring

pad-rightclj/s≠

clj
(pad-right str-val N)
(pad-right str-val N pad-char)
cljs
(pad-right G__45635 G__45636)
(pad-right G__45640 G__45641 G__45642)

Inputs: ([str-val :- s/Str N :- s/Int] [str-val :- s/Str N :- s/Int pad-char]) Returns: s/Str

Pads a string on the right until it is at least N chars in size

Inputs: ([str-val :- s/Str N :- s/Int] [str-val :- s/Str N :- s/Int pad-char])
Returns: s/Str

Pads a string on the right until it is at least N chars in size
sourceraw docstring

phonetic-alphabetclj/s

A map from keyword character to string phonetic name:

{:a 'alpha' :b 'bravo' :c 'charlie' :d 'delta' :e 'echo' :f 'foxtrot' :g 'golf' :h 'hotel' :i 'india' :j 'juliett' :k 'kilo' :l 'lima' :m 'mike' :n 'november' :o 'oscar' :p 'papa' :q 'quebec' :r 'romeo ' :s 'sierra' :t 'tango' :u 'uniform' :v 'victor' :w 'whiskey' :x 'x-ray' :y 'yankee' :z 'zulu' }

A map from keyword character to string phonetic name:

{:a 'alpha'    :b 'bravo'    :c 'charlie'  :d 'delta'    :e 'echo'     :f 'foxtrot'  :g 'golf'
 :h 'hotel'    :i 'india'    :j 'juliett'  :k 'kilo'     :l 'lima'     :m 'mike'     :n 'november'
 :o 'oscar'    :p 'papa'     :q 'quebec'   :r 'romeo '   :s 'sierra'   :t 'tango'    :u 'uniform'
 :v 'victor'   :w 'whiskey'  :x 'x-ray'    :y 'yankee'   :z 'zulu' }
sourceraw docstring

pluralize-withclj/s

(pluralize-with N base-str)

Returns base-str when N=1; otherwise appends an s

Returns `base-str` when N=1; otherwise appends an `s`
sourceraw docstring

quotes->doubleclj/s

(quotes->double arg)

Inputs: [arg :- s/Str] Returns: s/Str

Converts all single-quotes in a string to double-quotes

Inputs: [arg :- s/Str]
Returns: s/Str

Converts all single-quotes in a string to double-quotes
sourceraw docstring

quotes->singleclj/s

(quotes->single arg)

Inputs: [arg :- s/Str] Returns: s/Str

Converts all double-quotes in a string to single-quotes

Inputs: [arg :- s/Str]
Returns: s/Str

Converts all double-quotes in a string to single-quotes
sourceraw docstring

re-quote-replacementclj

Alias for clojure.string/re-quote-replacement

Alias for clojure.string/re-quote-replacement
sourceraw docstring

replaceclj/s

Alias for clojure.string/replace

Alias for clojure.string/replace
sourceraw docstring

replace-firstclj/s

Alias for clojure.string/replace-first

Alias for clojure.string/replace-first
sourceraw docstring

reverseclj/s

Alias for clojure.string/reverse

Alias for clojure.string/reverse
sourceraw docstring

splitclj/s

Alias for clojure.string/split

Alias for clojure.string/split
sourceraw docstring

split-linesclj/s

Alias for clojure.string/split-lines

Alias for clojure.string/split-lines
sourceraw docstring

starts-with?clj/s

Alias for clojure.string/starts-with?

Alias for clojure.string/starts-with?
sourceraw docstring

str->byte-arrayclj

(str->byte-array arg)

Converts a String to a byte array using the UTF-8 Charset

Converts a String to a byte array using the UTF-8 Charset
sourceraw docstring

str->kw-normalizedclj/s

(str->kw-normalized arg)

Returns a keyword constructed from a normalized string

Returns a keyword constructed from a normalized string
sourceraw docstring

str-keep-leftclj/s

(str-keep-left str-val n)

Keeps the N left-most chars of a string

Keeps the N left-most chars of a string
sourceraw docstring

str-keep-rightclj/s

(str-keep-right str-val n)

Keeps the N right-most chars of a string

Keeps the N right-most chars of a string
sourceraw docstring

string->streamclj

(string->stream str-val)

Inputs: [str-val :- s/Str] Returns: InputStream

Inputs: [str-val :- s/Str]
Returns: InputStream
sourceraw docstring

tabs->spacesclj/s≠

clj
(tabs->spaces src-str)
(tabs->spaces tab-size src-str)
cljs
(tabs->spaces G__45435)
(tabs->spaces G__45439 G__45440)

Inputs: ([src-str :- s/Str] [tab-size :- s/Int src-str :- s/Str]) Returns: s/Str

Replaces all tabs with appropriate number of spaces (default tab-size => 8) Usage:

  (tabs->spaces   'abc<tab>def'  => 'ab      cd'
  (tabs->spaces 4 'ab<tab>cd'    => 'ab  cd'
Inputs: ([src-str :- s/Str] [tab-size :- s/Int src-str :- s/Str])
Returns: s/Str

Replaces all tabs with appropriate number of spaces (default tab-size => 8)
 Usage:

      (tabs->spaces   'abc<tab>def'  => 'ab      cd'
      (tabs->spaces 4 'ab<tab>cd'    => 'ab  cd'
sourceraw docstring

takeclj/s

(take n txt)

Inputs: [n :- s/Int txt :- s/Str] Returns: s/Str

Drops the first N chars of a string, returning a string result.

Inputs: [n :- s/Int txt :- s/Str]
Returns: s/Str

Drops the first N chars of a string, returning a string result.
sourceraw docstring

text?clj/s

(text? & args)

Returns true iff every char passes tupelo.chars/text?

Returns true iff every char passes tupelo.chars/text?
sourceraw docstring

trimclj/s

Alias for clojure.string/trim

Alias for clojure.string/trim
sourceraw docstring

trim-newlineclj/s

Alias for clojure.string/trim-newline

Alias for clojure.string/trim-newline
sourceraw docstring

trimlclj/s

Alias for clojure.string/triml

Alias for clojure.string/triml
sourceraw docstring

trimrclj/s

Alias for clojure.string/trimr

Alias for clojure.string/trimr
sourceraw docstring

upper-caseclj/s

Alias for clojure.string/upper-case

Alias for clojure.string/upper-case
sourceraw docstring

uppercase?clj/s

(uppercase? & args)

Returns true iff every char passes tupelo.chars/uppercase?

Returns true iff every char passes tupelo.chars/uppercase?
sourceraw docstring

UTF-8-Charset-Nameclj/s

source

uuid?clj/s

(uuid? arg)

Inputs: [arg :- s/Str] Returns: s/Bool

Returns true if the arg is a UUID-format string like '123e4567-e89b-12d3-a456-426614174000'

Inputs: [arg :- s/Str]
Returns: s/Bool

Returns true if the arg is a UUID-format string like '123e4567-e89b-12d3-a456-426614174000'
sourceraw docstring

visible?clj/s

(visible? & args)

Returns true iff every char passes tupelo.chars/visible?

Returns true iff every char passes tupelo.chars/visible?
sourceraw docstring

walk-clojurize-keysclj/s

(walk-clojurize-keys form)

Recursively walks form, normalizing all map keys via clojurize-key.

Recursively walks form, normalizing all map keys via `clojurize-key`. 
sourceraw docstring

walk-keywords->stringsclj/s

(walk-keywords->strings form)

Recursively walks form, converting all keywords to strings.

Recursively walks form, converting all keywords to strings. 
sourceraw docstring

walk-strings->keywordsclj/s

(walk-strings->keywords form)

Recursively walks form, converting all strings to keywords.

Recursively walks form, converting all strings to keywords. 
sourceraw docstring

whitespace-collapseclj/s

(whitespace-collapse arg)

Inputs: [arg :- s/Str] Returns: s/Str

Replaces all consecutive runs of whitespace characters (including newlines) with a single space. Removes any leading or trailing whitespace. Returns a string composed of all tokens separated by a single space.

Inputs: [arg :- s/Str]
Returns: s/Str

Replaces all consecutive runs of whitespace characters (including newlines) with a single space.
 Removes any leading or trailing whitespace. Returns a string composed of all tokens
 separated by a single space.
sourceraw docstring

whitespace-eol?clj/s

(whitespace-eol? & args)

Returns true iff every char passes tupelo.chars/whitespace-eol?

Returns true iff every char passes tupelo.chars/whitespace-eol?
sourceraw docstring

whitespace-horiz?clj/s

(whitespace-horiz? & args)

Returns true iff every char passes tupelo.chars/whitespace-horiz?

Returns true iff every char passes tupelo.chars/whitespace-horiz?
sourceraw docstring

whitespace-removeclj/s

(whitespace-remove arg)

Inputs: [arg :- s/Str] Returns: s/Str

Removes all whitespace characters (including newlines) from string.

Inputs: [arg :- s/Str]
Returns: s/Str

Removes all whitespace characters (including newlines) from string. 
sourceraw docstring

whitespace?clj/s

(whitespace? & args)

Returns true iff every char passes tupelo.chars/whitespace?

Returns true iff every char passes tupelo.chars/whitespace?
sourceraw docstring

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

× close