User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cl:functions:make-string-output-stream [2019/06/15 02:00]
cl:functions:make-string-output-stream [2019/06/18 09:00] (current)
Line 1: Line 1:
 +====== Function MAKE-STRING-OUTPUT-STREAM ======
 +
 +====Syntax====
 +  * **make-string-output-stream** ''&​key''​ //​element-type//​ → //​string-stream//​
 +
 +====Arguments and Values====
 +  * //​element-type//​ - a //​[[CL:​Glossary:​type specifier]]//​. The default is **[[CL:​Types:​character]]**.
 +  * //​string-stream//​ - an //​[[CL:​Glossary:​output]]//​ //​[[CL:​Glossary:​string stream]]//.
 +
 +====Description====
 +Returns an //​[[CL:​Glossary:​output]]//​ //​[[CL:​Glossary:​string stream]]// that accepts //​[[CL:​Glossary:​character|characters]]//​ and makes available (via **[[CL:​Functions:​get-output-stream-string]]**) a //​[[CL:​Glossary:​string]]//​ that contains the //​[[CL:​Glossary:​character|characters]]//​ that were actually output.
 +
 +The //​element-type//​ names the //​[[CL:​Glossary:​type]]//​ of the //​[[CL:​Glossary:​element|elements]]//​ of the //​[[CL:​Glossary:​string]]//;​ a //​[[CL:​Glossary:​string]]//​ is constructed of the most specialized //​[[CL:​Glossary:​type]]//​ that can accommodate //​[[CL:​Glossary:​element|elements]]//​ of that //​[[CL:​Glossary:​element-type]]//​.
 +
 +====Examples====
 +<​blockquote>​
 +([[CL:​Special Operators:​let]] ((s (make-string-output-stream))) ​
 +  ([[CL:​Functions:​write-string]] "​testing... " s) 
 +  ([[CL:​Functions:​prin1]] 1234 s) 
 +  ([[CL:​Functions:​get-output-stream-string]] s)) <​r>"​testing... 1234" </r>
 +</​blockquote>​
 +
 +====Affected By====
 +None.
 +
 +====Exceptional Situations====
 +None.
 +
 +====See Also====
 +  * **[[CL:​Functions:​get-output-stream-string|Function GET-OUTPUT-STREAM-STRING]]**
 +  * **[[CL:​Macros:​with-output-to-string|Macro WITH-OUTPUT-TO-STRING]]**
 +
 +====Notes====
 +None.
 +
 +\issue{CHARACTER-PROPOSAL:​2-5-6} \issue{STREAM-ACCESS:​ADD-TYPES-ACCESSORS} \issue{CHARACTER-PROPOSAL:​2-5-6}