Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Common Lisp string splitting
(defun space-split (string)
"Parses integer strings right now but can be easily altered for
other purposes "
(loop for start = 0 then (1+ finish)
for finish = (position #\Space string :start start)
collecting (parse-integer (subseq string start finish))
until (null finish)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.