Advertisement
Guest User

Untitled

a guest
Nov 29th, 2021
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. (defun read-ascii-strings (stream)
  2. (loop :with result := '()
  3. :for byte := (read-byte stream)
  4. :if (= byte (char-code #\space))
  5. :do (push (coerce accum 'string) result)
  6. (setf accum '())
  7. :else
  8. :collect (code-char byte) :into accum
  9. :until (= 10 byte)
  10. :finally (progn
  11. (push (coerce (remove #\return accum) 'string) result)
  12. (return (nreverse result)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement