Name

with-output-to-string

Usage

macro

Syntax

(with-output-to-string (sym) &body forms)

Description

Binds sym to a string writer and executes forms as a do block. Returns the contents of the string writer.

user > (with-output-to-string ($stdout) (print "hello"))
it: "hello"