Liking cljdoc? Tell your friends :D

hara.string.base.common


*sep*clj


blank?clj

(blank? s)

checks if string is empty or nil

(blank? nil) => true

(blank? "") => true

checks if string is empty or nil

(blank? nil)
=> true

(blank? "")
=> true
raw docstring

capital-caseclj

(capital-case s)

converts a string object to capital case

(capital-case "hello.World") => "Hello.world"

(string/capital-case 'hello.World) => 'Hello.world

converts a string object to capital case

(capital-case "hello.World")
=> "Hello.world"

(string/capital-case 'hello.World)
=> 'Hello.world
raw docstring

caseless=clj

(caseless= x y)

compares two values ignoring case

(caseless= "heLLo" "HellO") => true

(string/caseless= 'heLLo :HellO) => true

compares two values ignoring case

(caseless= "heLLo" "HellO")
=> true

(string/caseless= 'heLLo :HellO)
=> true
raw docstring

ends-with?clj

(ends-with? s substr)

checks if string ends with another

(ends-with? "hello" "lo") => true

(string/ends-with? 'hello 'lo) => true

checks if string ends with another

(ends-with? "hello" "lo")
=> true

(string/ends-with? 'hello 'lo)
=> true
raw docstring

includes?clj

(includes? s substr)

checks if first string contains the second

(includes? "hello" "ell") => true

(string/includes? 'hello 'ell) => true

checks if first string contains the second

(includes? "hello" "ell")
=> true

(string/includes? 'hello 'ell)
=> true
raw docstring

joinclj

(join coll)
(join seperator coll)

like join but used with ->> opts

(join "." ["a" "b" "c"]) => "a.b.c"

(string/join "." '[a b c]) => 'a.b.c

like `join` but used with `->>` opts

(join "." ["a" "b" "c"])
=> "a.b.c"

(string/join "." '[a b c])
=> 'a.b.c
raw docstring

joinlclj

(joinl coll)
(joinl coll separator)

joins an array using a separator

(joinl ["a" "b" "c"] ".") => "a.b.c"

(joinl ["a" "b" "c"]) => "abc"

(string/joinl [:a :b :c] "-") => :a-b-c

joins an array using a separator

(joinl ["a" "b" "c"] ".")
=> "a.b.c"

(joinl ["a" "b" "c"])
=> "abc"

(string/joinl [:a :b :c] "-")
=> :a-b-c
raw docstring

lower-caseclj

(lower-case s)

converts a string object to lower case

(lower-case "Hello.World") => "hello.world"

(string/lower-case 'Hello.World) => 'hello.world

converts a string object to lower case

(lower-case "Hello.World")
=> "hello.world"

(string/lower-case 'Hello.World)
=> 'hello.world
raw docstring

replaceclj

(replace s match replacement)

replace value in string with another

(replace "hello" "el" "AL") => "hALlo"

(string/replace :hello "el" "AL") => :hALlo

replace value in string with another

(replace "hello" "el" "AL")
=> "hALlo"

(string/replace :hello "el" "AL")
=> :hALlo
raw docstring

reverseclj

(reverse s)

reverses the string

(reverse "hello") => "olleh"

(string/reverse :hello) => :olleh

reverses the string

(reverse "hello")
=> "olleh"

(string/reverse :hello)
=> :olleh
raw docstring

splitclj

(split s re)

splits the string into tokens

(split "a b c" #" ") => ["a" "b" "c"]

(string/split :a.b.c (re-pattern ".")) => [:a :b :c]

splits the string into tokens

(split "a b c" #" ")
=> ["a" "b" "c"]

(string/split :a.b.c (re-pattern "\."))
=> [:a :b :c]
raw docstring

split-linesclj

(split-lines s)

splits the string into separate lines

(split-lines "a\nb\nc") => ["a" "b" "c"]

splits the string into separate lines

(split-lines "a\nb\nc")
=> ["a" "b" "c"]
raw docstring

starts-with?clj

(starts-with? s substr)

checks if string starts with another

(starts-with? "hello" "hel") => true

(string/starts-with? 'hello 'hel) => true

checks if string starts with another

(starts-with? "hello" "hel")
=> true

(string/starts-with? 'hello 'hel)
=> true
raw docstring

trimclj

(trim s)

trims the string of whitespace

(trim " hello ") => "hello"

trims the string of whitespace

(trim "   hello   ")
=> "hello"
raw docstring

trim-leftclj

(trim-left s)

trims the string of whitespace on left

(trim-left " hello ") => "hello "

trims the string of whitespace on left

(trim-left "   hello   ")
=> "hello   "
raw docstring

trim-newlinesclj

(trim-newlines s)

removes newlines from right

(trim-newlines "\n\n hello \n\n") => "\n\n hello "

removes newlines from right

(trim-newlines  "\n\n    hello   \n\n")
=> "\n\n    hello   "
raw docstring

trim-rightclj

(trim-right s)

trims the string of whitespace on right

(trim-right " hello ") => "hello"

trims the string of whitespace on right

(trim-right "   hello   ")
=> "hello"
raw docstring

upper-caseclj

(upper-case s)

converts a string object to upper case

(upper-case "hello-world") => "HELLO-WORLD"

(string/upper-case :hello-world) => :HELLO-WORLD

converts a string object to upper case

(upper-case "hello-world")
=> "HELLO-WORLD"

(string/upper-case :hello-world)
=> :HELLO-WORLD
raw docstring

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

× close