Suppose a function foo writes to standard output:
(defun foo ()
(format t "Hello, world"))
To capture its output in a character string, *standard-output* can be bound to a string stream and called:
(with-output-to-string (*standard-output*)
(foo))
Nincsenek megjegyzések:
Megjegyzés küldése