5 Aug
2009
5 Aug
'09
8:08 a.m.
You might want to include this in camel-case.lisp or contrib. It's barely tested so far though. (defun simplified-camel-case-to-lisp (camel-string) "We don't want + and * all over the place." (declare (string camel-string)) (let ((*print-pretty* nil)) (with-output-to-string (result) (loop for c across camel-string with last-was-lowercase when (and last-was-lowercase (upper-case-p c)) do (princ "-" result) if (lower-case-p c) do (setf last-was-lowercase t) else do (setf last-was-lowercase nil) do (princ (char-upcase c) result))))) Leslie -- http://www.linkedin.com/in/polzer