Commit b48328bc authored by Christophe Rhodes's avatar Christophe Rhodes
Browse files

Clean up string-unix-common-casify

parent 871b3f7f
......@@ -91,9 +91,9 @@
(setf end (length string)))
(let ((result (copy-seq string)))
(cond
((every (lambda (x) (or (not (alpha-char-p x)) (and (char>= x #\A) (char<= x #\Z)))) (subseq string start end))
((every (lambda (x) (or (upper-case-p x) (not (alpha-char-p x)))) (subseq string start end))
(nstring-downcase result :start start :end end))
((every (lambda (x) (or (not (alpha-char-p x)) (and (char>= x #\a) (char<= x #\z)))) (subseq string start end))
((every (lambda (x) (or (lower-case-p x) (not (alpha-char-p x)))) (subseq string start end))
(nstring-upcase result :start start :end end))
(t result))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment