open-output-string

(open-output-string str)


Description:

Create output port using str as backing.  Make sure the backing str has the required length because it will not auto extend.


Arguments:

            str -- string


Returns: boolean


Examples:

(define str (make-string 100))

(define port (open-output-string str))

(write "hello world " port)

(write 5.5 port)

(close-output-port port)

(print str)



Back to index