Next: , Previous: , Up: Procedures   [Contents][Index]


7.3.3 String Ports

(require 'string-port)

Procedure: call-with-output-string proc

proc must be a procedure of one argument. This procedure calls proc with one argument: a (newly created) output port. When the function returns, the string composed of the characters written into the port is returned.

Procedure: call-with-input-string string proc

proc must be a procedure of one argument. This procedure calls proc with one argument: an (newly created) input port from which string’s contents may be read. When proc returns, the port is closed and the value yielded by the procedure proc is returned.