798 |
@deffnx {C Function} scm_call_with_output_string (proc) |
@deffnx {C Function} scm_call_with_output_string (proc) |
799 |
Calls the one-argument procedure @var{proc} with a newly created output |
Calls the one-argument procedure @var{proc} with a newly created output |
800 |
port. When the function returns, the string composed of the characters |
port. When the function returns, the string composed of the characters |
801 |
written into the port is returned. |
written into the port is returned. @var{proc} should not close the port. |
802 |
@end deffn |
@end deffn |
803 |
|
|
804 |
@deffn {Scheme Procedure} call-with-input-string string proc |
@deffn {Scheme Procedure} call-with-input-string string proc |
842 |
Given an output port created by @code{open-output-string}, |
Given an output port created by @code{open-output-string}, |
843 |
return a string consisting of the characters that have been |
return a string consisting of the characters that have been |
844 |
output to the port so far. |
output to the port so far. |
845 |
|
|
846 |
|
@code{get-output-string} must be used before closing @var{port}, once |
847 |
|
closed the string cannot be obtained. |
848 |
@end deffn |
@end deffn |
849 |
|
|
850 |
A string port can be used in many procedures which accept a port |
A string port can be used in many procedures which accept a port |