String manipulation usable both in clj and cljs
String manipulation usable both in clj and cljs
(limit-length s limit)
(limit-length s limit prefix suffix on-ellipsis)
Limit the length of the string Params:
s
string to limitlimit
maximum numbers of character of the resulting string, with prefix and suffix included, with an ellipsis of string s if necessaryon-ellipsis
a function executed when the ellipsis is doneLimit the length of the string Params: * `s` string to limit * `limit` maximum numbers of character of the resulting string, with prefix and suffix included, with an ellipsis of string s if necessary * `on-ellipsis` a function executed when the ellipsis is done
(remove-first-last-character s)
Remove the first and last character of a string
Remove the first and last character of a string
(remove-last-character s)
Remove the last character of a string
Remove the last character of a string
(remove-trailing-character s char)
Remove last character if it is matching char Params:
s
stringchar
a character to compare to last character of s
Remove last character if it is matching char Params: * `s` string * `char` a character to compare to last character of `s`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close