Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - mwg

#1
Anything else we might add? /
December 31, 2005, 08:36:12 PM
Oops, with the following:



(defun explode (string1)

      (let* ((character   (string (char string1 0)))

             (new-string  (subseq string1 1))

             (new-length  (length new-string)))

             (cond ((eql new-length 1) (list character new-string))

                  (t   (cons character (explode new-string))))))



...which leads to....



; SLIME: The Superior Lisp Interaction Mode for Emacs



CL-USER> (explode "This a string")

("T" "h" "i" "s" " " "a" " " "s" "t" "r" "i" "n" "g")

CL-USER>



mwg
#2
Anything else we might add? /
December 31, 2005, 08:20:23 PM
Maybe the first item here:



http://cl-cookbook.sourceforge.net/strings.html">http://cl-cookbook.sourceforge.net/strings.html



is what you want.



Regards,

mwg