added string functions

This commit is contained in:
2021-03-28 13:42:53 +02:00
parent 337fb2f80d
commit 89dd5c6f07
6 changed files with 45 additions and 8 deletions

View File

@@ -5,6 +5,15 @@
(print (string-ltrim " abc"))
(print (string-trim " abc "))
(defun string-upcase (str)
(string-case str "upper"))
(defun string-downcase (str)
(string-case str "lower"))
(print (string-upcase "abcABCD"))
(print (string-downcase "abcABCD"))
;; (print (sprintf "%.2f" (list 1.25)))
;; (print (sprintf "%.2f" '(1.23456)))