Package with-output-to-stream
Description
Simply import with-output-to-stream. Don't (:use)!
with-output-to-stream provides a simple way of directing output to a stream
according to the concise and intuitive semantics of format's stream argument.
Simply import with-output-to-stream. Don't (:use)!
(var &optional stream &key element-type) &body body => result
t, nil, or a string with a fill pointer. The default is nil.character.nil, a string; otherwise, nil.with-output-to-stream has the same syntax and semantics as with-output-to-string, except for the following improvement:
stream is always evaluated and, analogously to the destination argument to format, the value can be either a stream to send the output to that stream, nil to accumulate the output into a string and return it, t to send the output to *standard-output*, or a string with a fill pointer to accumulate the output into that string. (The result is analogous to format's result.)