Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun read-ascii-strings (stream)
- (loop :with result := '()
- :for byte := (read-byte stream)
- :if (= byte (char-code #\space))
- :do (push (coerce accum 'string) result)
- (setf accum '())
- :else
- :collect (code-char byte) :into accum
- :until (= 10 byte)
- :finally (progn
- (push (coerce (remove #\return accum) 'string) result)
- (return (nreverse result)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement