open_string
open_string — allows a string to be used as a file.
open_string (string)
stringA string.
A pseudo-file that contains the string if
successful, otherwise nil.
This function allows a string to be used as a pseudo-file to facilitate reading and writing to a local buffer. All read and write functions which operate on a file can operate on the result of this call. An attempt to write to the string always appends information destructively to the string. Subsequent reads on the string can retrieve this information. A string is always opened for both read and write.
Gamma>s = open_string("Hello there.");#<File:"String">Gamma>read_line(s);"Hello there."Gamma>s = open_string("Hello there.");#<File:"String">Gamma>read(s);HelloGamma>read(s);there.Gamma>read(s);"Unexpected end of file"Gamma>
close, open, read, read_char, read_double, read_float, read_line, read_long, read_short, read_until, terpri, write, writec