(align-regexp regex string)
e.g. (align-regexp #" = " " var x = 1; var y = 2; var asdf = 3; ") => " var x = 1; var y = 2; var asdf = 3; "
e.g. (align-regexp #" = " " var x = 1; var y = 2; var asdf = 3; ") => " var x = 1; var y = 2; var asdf = 3; "
(align-regexp* regex lines)
Will align all lines
to the first match of regex
Will align all `lines` to the first match of `regex`
(blank->nil s)
Nullify empty strings, identity on all other values.
Nullify empty strings, identity on all other values.
(empty->nil s)
Deprecated. Use clojure.core/not-empty
Deprecated. Use clojure.core/not-empty
(empty? s)
Deprecated. Use clojure.core/empty?
Deprecated. Use clojure.core/empty?
(match-position regex string)
Return the position of the first regex
match in string
.
Return the position of the first `regex` match in `string`.
(pad-string regex position string)
left-pad the first regex
match in string
to shift it to the given position
.
e.g.: (pad-string #"@" 5 "left@right") => "left @right" -- because 'left' is 4 chars
left-pad the first `regex` match in `string` to shift it to the given `position`. e.g.: (pad-string #"@" 5 "left@right") => "left @right" -- because 'left' is 4 chars
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close