WriteString
WriteString["file","string"]
writes "string" to a file.
WriteString[channel,"string"]
writes "string" to a stream or process.
WriteString[channel,expr1,expr2,…]
converts the expri to strings, and then writes them in sequence to the specified output channel.
Details
- WriteString will open a file for writing, erasing all existing data, if it is not already open.
- WriteString[File["file"],…] is also supported.
- WriteString uses the OutputForm of the expri.
- WriteString does not put a newline at the end of the output it generates.
Examples
open allclose allBasic Examples (2)
Scope (1)
Properties & Relations (1)
WriteString does not insert line breaks after each string it writes:
Use WriteLine to automatically insert a trailing newline:
Text
Wolfram Research (1988), WriteString, Wolfram Language function, https://reference.wolfram.com/language/ref/WriteString.html (updated 2016).
CMS
Wolfram Language. 1988. "WriteString." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/WriteString.html.
APA
Wolfram Language. (1988). WriteString. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WriteString.html