String Handles¶
String handles use memory as their backing store otherwise they are one implementation of handles.
You can write to a string until you run out of memory in the same way you can write to a file until you run of space in the file system.
You can only have input or output string handles, not a mixed form.
An output string handle requires an extra step,
get-output-string string-handle
to retrieve the string in
the string handle. Compare this with having to, say, cat a
file to retrieve its contents after having written to it.
String Handle Predicates¶
- function string-handle? o¶
test if o is a string handle
- Param o:
object to test
- Return:
#t
if o is a string handle,#f
otherwise
- function input-string-handle? o¶
test if o is a input string handle
- Param o:
object to test
- Return:
#t
if o is a input string handle,#f
otherwise
- function output-string-handle? o¶
test if o is a output string handle
- Param o:
object to test
- Return:
#t
if o is a output string handle,#f
otherwise
String Handle Constructors¶
- function open-input-string str¶
create an input string handle from str
- Param str:
contents of input string handle
- Type str:
string
- Return:
input string handle
- Rtype:
handle
- function open-output-string¶
create an output string handle
- Return:
output string handle
- Rtype:
handle
String Handle Functions¶
- function get-output-string sh¶
return the accumulated string in output string handle sh
- Param sh:
output string handle
- Type sh:
output string handle
- Return:
accumulated string
- Rtype:
string
Last built at 2025-02-05T07:10:42Z+0000 from 62cca4c (dev) for Idio 0.3.b.6