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

Changed decode to use a string stream

darcs-hash:20080518110003-c72ca-e177e45e0eb5ba5061309c0d281ab26a04085847
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+
(loop
:for word :in (ppcre:split *crlfsp* str :start start :end end)
:collect (decode-one-word word))))
(loop
: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)
(loop
......
Markdown is supported
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