TextString
TextString[expr]
gives a human-readable string representation of expr.
Details and Options


- TextString converts expressions to a single string, formatting expressions with the following heads specially:
-
String formats unchanged Integer,Real,Rational formats using decimal notation Quantity formats using decimal notation with unit DateObject formats according to DateFormat TimeObject formats according to TimeFormat GeoPosition formats using degrees latitude and longitude Entity formats using CommonName Symbol formats using SymbolName Missing formats according to MissingString List formats elements, combining as specified by ListFormat Association formats keys and values, combining as specified by AssociationFormat - TextString[Row[list]] formats as a concatenation of elements of list.
- TextString[Row[list,sep]] uses separator sep to combine formatted elements.
- TextString[Column[list]] formats each element on a separate line.
- TextString[TableForm[list]] formats a list of lists as space-separated columns.
- Expressions that match patterns in the list given as the setting for ElidedForms are formatted in an elided way.
- In other cases, expressions are formatted using InputForm.
- TextString supports the following options:
-
AssociationFormat Automatic format to use when formatting associations BooleanStrings {"True","False"} strings to use for True and False DateFormat $DateStringFormat format to use for dates ElidedForms Automatic list of heads whose contents should be elided ListFormat Automatic format to use when formatting lists MissingString "" string to use for Missing objects TimeFormat Automatic format to use for times TimeZone $TimeZone time zone used to convert times before formatting
Examples
open allclose allBasic Examples (3)
Scope (4)
Options (6)
Properties & Relations (1)
Possible Issues (1)
See Also
ToString StringTemplate InputForm OutputForm Short WriteString
Related Guides
Related Links
Introduced in 2014
(10.0)