auto-core.string
String manipulation usable both in clj and cljs
ellipsis
limit-length
(limit-length s limit)
(limit-length s limit prefix suffix on-ellipsis)
Limit 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
(remove-first-last-character s)
Remove the first and last character of a string
remove-last-character
(remove-last-character s)
Remove the last character of a string
remove-trailing-character
(remove-trailing-character s char)
Remove last character if it is matching char Params: * s
string * char
a character to compare to last character of s