Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Max Rottenkolber
cl-rfc2047
Commits
23bb3b0a
Commit
23bb3b0a
authored
May 18, 2008
by
ch
Browse files
Changed decode to use a string stream
darcs-hash:20080518110003-c72ca-e177e45e0eb5ba5061309c0d281ab26a04085847
parent
e5dd7c29
Changes
1
Hide whitespace changes
Inline
Side-by-side
cl-rfc2047.lisp
View file @
23bb3b0a
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment