Skip to content
Snippets Groups Projects
Commit a67c3a6c authored by Philipp Marek's avatar Philipp Marek
Browse files

Merge #24.

parents 6352e599 6ff6820c
No related branches found
No related tags found
No related merge requests found
......@@ -53,9 +53,10 @@ which is only sent to WITH-OPEN-FILE when it's not NIL."
(defun read-stream-content-into-string (stream &key (buffer-size 4096))
"Return the \"content\" of STREAM as a fresh string."
(check-type buffer-size positive-integer)
(let ((*print-pretty* nil))
(with-output-to-string (datum)
(let ((buffer (make-array buffer-size :element-type 'character)))
(let ((*print-pretty* nil)
(element-type (stream-element-type stream)))
(with-output-to-string (datum nil :element-type element-type)
(let ((buffer (make-array buffer-size :element-type element-type)))
(loop
:for bytes-read = (read-sequence buffer stream)
:do (write-sequence buffer datum :start 0 :end bytes-read)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment