Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 27 |
Nodes: | 6 (0 / 6) |
Uptime: | 41:22:04 |
Calls: | 631 |
Calls today: | 2 |
Files: | 1,187 |
D/L today: |
24 files (29,813K bytes) |
Messages: | 174,725 |
With a sepacialized splitter:
(defun split-string (string)
(loop
:with in-word := nil
:with result := '()
:with start := 0
:for pos :from 0
:for chr :across string
:do (if in-word
(when (char= #\space chr)
(setf in-word nil)
(push (subseq string start pos) result))
(when (char/= #\space chr)
(setf start pos
in-word t)))
:finally (when in-word
(push (subseq string start pos) result))
(return (nreverse result))))