Go to the first, previous, next, last section, table of contents.


String Ports

primitive: 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.

primitive: 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.

primitive: eval-string string
Evaluate string as the text representation of a Scheme form or forms, and return whatever value they produce. [FIXME: figure out where this should go... eval-string is not really closely related to other string port functions. It just happens to appear in strports.c because it uses a string port to read from the string. -twp]


Go to the first, previous, next, last section, table of contents.