Skip to content

Instantly share code, notes, and snippets.

@trendsetter37
Created December 12, 2014 22:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trendsetter37/b0fb345d77efcb1daa48 to your computer and use it in GitHub Desktop.
Save trendsetter37/b0fb345d77efcb1daa48 to your computer and use it in GitHub Desktop.
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