Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Practical Lisp

Name: Anonymous 2011-03-03 8:09

How to split and join a line by the delimiter in Common Lisp?

In Python it's:
>>> 'hax,my,anus'.split(',')
['hax', 'my', 'anus']


and

>>> ','.join(['hax', 'my', 'anus'])
'hax,my,anus'


respectively.

Name: Anonymous 2011-03-03 8:30

>>1
> (string-join '("hax" "my" "anus") ".")
"hax.my.anus"

> (regexp-split "," "hax,my,anus")
'("hax" "my" "anus")


Don't know in CL. You can use format for joining. Or http://www.cliki.net/SPLIT-SEQUENCE

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List