Liking cljdoc? Tell your friends :D

clojurewerkz.support.string


camel-case-splitterclj

source

camelizeclj

(camelize s)

Turns snake_case into CamelCase:

clojure => Clojure special_guest => SpecialGuest

Turns snake_case into CamelCase:

clojure       => Clojure
special_guest => SpecialGuest
sourceraw docstring

char-counterclj

(char-counter ch)

Returns a function that counts character occurences in a string

Returns a function that counts character occurences in a string
sourceraw docstring

count-placeholdersclj

source

from-byte-bufferclj

(from-byte-buffer buf)

Creates a new string from the contents of the provided NIO byte buffer

Creates a new string from the contents of the provided NIO byte buffer
sourceraw docstring

hex-to-intclj

(hex-to-int s)
source

interpolate-kvclj

(interpolate-kv pattern m)

Replaces named placeholders (:name, :x, :age, etc) in the string with values of their respective keys in the provided map.

Examples:

(interpolate-kv "X = :x" {:x "42"}) ;= "X = 42"

Replaces named placeholders (:name, :x, :age, etc) in the string with values of their respective keys in the provided map.

Examples:

(interpolate-kv "X = :x" {:x "42"}) ;= "X = 42"
sourceraw docstring

interpolate-valsclj

(interpolate-vals pattern values)

Replaces value placeholders (?) in the string with their respective positional values.

Examples:

(interpolate-vals "X = ?" ["42"]) ;= "X = 42"

Replaces value placeholders (?) in the string with their respective positional values.

Examples:

(interpolate-vals "X = ?" ["42"]) ;= "X = 42"
sourceraw docstring

interpolation-placeholder-patternclj

source

maybe-appendclj

(maybe-append s suffix)
source

maybe-choplclj

(maybe-chopl s prefix)
source

maybe-choprclj

(maybe-chopr s suffix)
source

maybe-prependclj

(maybe-prepend s prefix)
source

to-byte-bufferclj

(to-byte-buffer s)
(to-byte-buffer s encoding)

Wraps provided string into a NIO ByteBuffer

Wraps provided string into a NIO ByteBuffer
sourceraw docstring

truncateclj

(truncate s length)
(truncate s length omission)
source

underscoreclj

(underscore s)

Turns CamelCase into snake_case:

GL11Version => gl11_version SimpleXMLParser => simple_xml_parser

Turns CamelCase into snake_case:

GL11Version     => gl11_version
SimpleXMLParser => simple_xml_parser
sourceraw docstring

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

× close