Commit 23bb3b0a authored by ch's avatar ch
Browse files

Changed decode to use a string stream

parent e5dd7c29
......@@ -162,10 +162,11 @@ Throws an error if the character encoding is not known."
(t (error "unknown encoding ~A" encoding)))))))
(defun decode (str &key (start 0) (end (length str)))
(reduce #'string+
:for word :in (ppcre:split *crlfsp* str :start start :end end)
:collect (decode-one-word word))))
:with stream = (make-string-output-stream)
:for word :in (ppcre:split *crlfsp* str :start start :end end)
:do (princ (decode-one-word word) stream)
:finally (return (get-output-stream-string stream))))
(defun decode* (str)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment