Support additional casing xformations

More Elisp functions for transforming text casing!
This commit is contained in:
William Carroll 2018-05-29 16:24:41 -04:00
parent 32ac66d50b
commit e2891432e2

View file

@ -25,6 +25,16 @@
s-upcase s-upcase
(s-replace "-" "_"))) (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: ;;; Tests:
(ert-deftest caps->kebab-test () (ert-deftest caps->kebab-test ()