Function GET-OUTPUT-STREAM-STRING
get-output-stream-string string-output-stream => string
string-output-stream - ストリーム
string - 文字列
string-output-streamに出力された文字を順番に全て含む文字列を返却します。 この操作はstring-output-stream上の文字をクリアするので、 stringにはget-output-stream-stringが 最後に呼び出された以降のものか、 あるいはstring-output-streamが作成された以降のものから、 最新のものまでに生じた出力のみが含まれます。
(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) => ""string-output-streamはクリアされます。
なし。
string-output-streamがクローズされていたときの結果は未定義です。
string-output-streamがmake-string-output-streamによって 生成されたものではないときの結果は未定義です。
string-output-streamがwith-output-to-stringか formatによって暗黙的に生成されたもののときの結果は未定義です。
なし。