License: Public Domain , Load it with Quicklisp: (ql:quickload "with-output-to-stream")
Library type: Macro , Project complexity: Trivial

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.

Dictionary

Dictionary » with-output-to-stream

Macro with-output-to-stream

(var &optional stream &key element-type) &body body => result

Arguments and Values

Description

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.)