With the help of SPLIT-SEQUENCE
(<URL:http://ww.telent.net/cliki/SPLIT-SEQUENCE>):
(split-sequence #\, "foo,bar ,baz, foobar , barbaz,")
=> ("foo" "bar " "baz" " foobar " " barbaz" "")
--
Vebjorn Ljosa
As you would loop across any string:
(loop for char across string
...)
What are you trying to do?
Erik
For what it's worth, I think this is a completely wrong way of doing
this. It conses unnecessarily, and can generally get in the way of
neat tricks. I use a utility to iterate through the string, and call
my code with the start and end of the substrings.
I posted my utilities to do this here:
http://groups.google.com/groups?q=group:comp.lang.lisp+splitting-vector&hl=en&rnum=1&selm=xcvvghhpw95.fsf%40conquest.OCF.Berkeley.EDU
(Note the messed up error message for call-splitting-vector, when
start < 0, oops)
--
/|_ .-----------------------.
,' .\ / | No to Imperialist war |
,--' _,' | Wage class war! |
/ / `-----------------------'
( -. |
| ) |
(`-. '--.)
`. )----'