![[LISPWORKS]](/image.pl?url=http%3a%2f%2fwww.lispworks.com%2fdocumentation%2fHyperSpec%2fBody%2f..%2fGraphics%2fLWSmall.gif&f=jpg&w=240)
![[Common Lisp HyperSpec (TM)]](/image.pl?url=http%3a%2f%2fwww.lispworks.com%2fdocumentation%2fHyperSpec%2fBody%2f..%2fGraphics%2fCLHS_Sm.gif&f=jpg&w=240)
Syntax:
get-output-stream-stringstring-output-stream =>string
Arguments and Values:
string-output-stream---astream.
string---astring.
Description:
Returns astring containing, in order, all thecharacters that have been output tostring-output-stream. This operation clears anycharacters onstring-output-stream, so thestring contains only thosecharacters which have been output since the last call toget-output-stream-string or since the creation of thestring-output-stream, whichever occurred most recently.
Examples:
(setq a-stream (make-string-output-stream) a-string "abcdefghijklm") => "abcdefghijklm" (write-string a-string a-stream) => "abcdefghijklm" (get-output-stream-string a-stream) => "abcdefghijklm" (get-output-stream-string a-stream) => ""
Side Effects:
Thestring-output-stream is cleared.
Affected By: None.
Exceptional Situations:
The consequences are undefined ifstream-output-string isclosed.
The consequences are undefined ifstring-output-stream is astream that was not produced bymake-string-output-stream. The consequences are undefined ifstring-output-stream was created implicitly bywith-output-to-string orformat.
See Also:
Notes: None.