write-to-string

[procedure] write-to-string obj [writer]

Gauche: equivalent to

(with-output-to-string (lambda () (writer obj)))

[procedure] write-to-string obj [maxchars]

MIT-Scheme: when maxchars is given, the length of output is limited up to maxchars characters.