cl-change-case — Convert strings between camelCase, param-case, PascalCase and more
0.2.0
(use-package :cl-change-case)
(format t "~{~S~%~}"
(list (camel-case "test string")
(param-case "test string")
(pascal-case "test string")))
cl-change-case
is library to convert strings between camelCase
, PascalCase
, snake_case
, param-case
,
CONSTANT_CASE
and more.
This is a Common Lisp port of blakeembrey/change-case released under The MIT License.
Return the string in lower case.
(lower-case "TEST STRING")
Lower case of the first character of string.
(lower-case-first "TEST STRING")
Test if all characters in string have lower case.
(string-lower-case-p "test string")
Return the string in upper case.
(upper-case "test string")
Upper case the first character of string.
(upper-case-first "test string")
Test if all characters in string have upper case.
(string-upper-case-p "TEST STRING")
Make string a lower case, space separated string.
(no-case "test_stringTest")
Optionally you can provide a different replacement string.
(no-case "test_stringTest" :replacement "$$")
Convert string to camelCase
.
(camel-case "test_string")
Convert string to dot.case
.
(dot-case "Test String")
Title case string but dash separated.
(header-case "test string")
Convert string to param-case
.
(param-case "test string")
Convert string to PascalCase
.
(pascal-case "test string")
Convert string to path/case
.
(path-case "test string more")
Makes string a lower case, space separated string with the first word capitalized.
(sentence-case "thisIsATestString")
Convert string to snake_case
.
(snake-case "test string")
Reverse the case of each character in string.
(swap-case "PascalCase")
Make string space separated with each word capitalized.
(title-case "this_is a_test_string")
Convert string to CONSTANT_CASE
.
(constant-case "test string")
Sebastian Christ (mailto:[email protected])
Copyright (c) 2016 Sebastian Christ ([email protected])
Released under the LLGPL license.