Support additional casing xformations
More Elisp functions for transforming text casing!
This commit is contained in:
parent
32ac66d50b
commit
e2891432e2
1 changed files with 10 additions and 0 deletions
|
@ -25,6 +25,16 @@
|
|||
s-upcase
|
||||
(s-replace "-" "_")))
|
||||
|
||||
(defun lower->caps (x)
|
||||
"Change the casing of X from lowercase to CAPS_CASE."
|
||||
(->> x
|
||||
s-upcase
|
||||
(s-replace " " "_")))
|
||||
|
||||
(defun lower->kebab (x)
|
||||
"Change the casing of X from lowercase to kebab-case"
|
||||
(s-replace " " "-" x))
|
||||
|
||||
;;; Tests:
|
||||
|
||||
(ert-deftest caps->kebab-test ()
|
||||
|
|
Loading…
Reference in a new issue