Liking cljdoc? Tell your friends :D

tupelo.string

Tupelo - Making Clojure even sweeter

Tupelo - Making Clojure even sweeter
raw docstring

alpha?clj/s

(alpha? & args)
source

alphanumeric?clj/s

(alphanumeric? & args)
source

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

collapse-whitespaceclj/s

(collapse-whitespace arg)

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.

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

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?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)
source

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

equals-ignore-spacing?clj/s≠

clj
(equals-ignore-spacing? & args)
cljs
(equals-ignore-spacing? & rest25810)

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

Compares arguments 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 arguments for equality using tupelo.misc/collapse-whitespace.
 Equivalent to separating tokens by whitespace and comparing the resulting sequences.
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

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)
source

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

kabob->snakeclj/s

(kabob->snake arg)

Converts a string from a-kabob-case-value to a_snake_case_value

Converts a string from a-kabob-case-value to a_snake_case_value
sourceraw docstring

kw-kabob->snakeclj/s

(kw-kabob->snake kw)
source

kw-snake->kabobclj/s

(kw-snake->kabob kw)
source

lowercase?clj/s

(lowercase? & args)
source

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__25909 G__25910)
(pad-left G__25914 G__25915 G__25916)

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__25923 G__25924)
(pad-right G__25928 G__25929 G__25930)

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

quotes->doubleclj/s

(quotes->double arg)

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

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

quotes->singleclj/s

(quotes->single arg)

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

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

snake->kabobclj/s

(snake->kabob arg)

Converts a string from a_snake_case_value to a-kabob-case-value

Converts a string from a_snake_case_value to a-kabob-case-value
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

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__25794)
(tabs->spaces G__25798 G__25799)

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)
source

uppercase?clj/s

(uppercase? & args)
source

visible?clj/s

(visible? & args)
source

whitespace-eol?clj/s

(whitespace-eol? & args)
source

whitespace-horiz?clj/s

(whitespace-horiz? & args)
source

whitespace?clj/s

(whitespace? & args)
source

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

× close