TextString
✖
TextString
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)Summary of the most common use cases

https://wolfram.com/xid/0tztbhci-o1bxgr


https://wolfram.com/xid/0tztbhci-li1q72

Convert a GeoPosition:

https://wolfram.com/xid/0tztbhci-ey2q2d

Convert a DateObject:

https://wolfram.com/xid/0tztbhci-qx84jz

Convert a TimeObject:

https://wolfram.com/xid/0tztbhci-3grc7n

Convert a Quantity:

https://wolfram.com/xid/0tztbhci-fhsusw


https://wolfram.com/xid/0tztbhci-m6cx28

Scope (4)Survey of the scope of standard use cases
By default, TextString converts certain built-in expressions to an elided string:

https://wolfram.com/xid/0tztbhci-0nozg4

TextString recurses arbitrarily through lists and associations to convert an expression:

https://wolfram.com/xid/0tztbhci-7zcyjq

Typically, expressions that satisfy NumericQ are formatted as real numbers:

https://wolfram.com/xid/0tztbhci-02p288

Row formats as a concatenation of its contents:

https://wolfram.com/xid/0tztbhci-xn7oz4

Column formats each element on a new line:

https://wolfram.com/xid/0tztbhci-b2dwm6

TableForm formats elements as a table in which columns are space-separated:

https://wolfram.com/xid/0tztbhci-3j4idj

Options (6)Common values & functionality for each option
AssociationFormat (1)
By default, TextString formats associations as they normally appear in the Wolfram Language:

https://wolfram.com/xid/0tztbhci-ltfpia


https://wolfram.com/xid/0tztbhci-ic5tvc

BooleanStrings (1)
DateFormat (1)
TextString uses the same default format as DateString:

https://wolfram.com/xid/0tztbhci-n3gscq

Override the default date format:

https://wolfram.com/xid/0tztbhci-xji2qn

ElidedForms (1)
The default value ElidedForms->Automatic elides certain complex symbolic expressions:

https://wolfram.com/xid/0tztbhci-jaizqr

Ordinary symbolic expressions are formatted normally:

https://wolfram.com/xid/0tztbhci-7q9jnz

Elide specific symbolic expressions:

https://wolfram.com/xid/0tztbhci-lm50y4

Elide all symbolic expressions for which specific formatting rules do not exist:

https://wolfram.com/xid/0tztbhci-fu0fr3

ListFormat (1)
By default, TextString formats lists as they normally appear in the Wolfram Language:

https://wolfram.com/xid/0tztbhci-nufxys


https://wolfram.com/xid/0tztbhci-dkuvsm

MissingString (1)
By default, expressions with head Missing are ignored:

https://wolfram.com/xid/0tztbhci-l1849v


https://wolfram.com/xid/0tztbhci-cb2z45

Use the given reason, if available:

https://wolfram.com/xid/0tztbhci-xy3w2m

Properties & Relations (1)Properties of the function, and connections to other functions
UpValues can be defined for custom objects to determine how they should be formatted by TextString:

https://wolfram.com/xid/0tztbhci-n4ot1c

https://wolfram.com/xid/0tztbhci-uh2188

Wolfram Research (2014), TextString, Wolfram Language function, https://reference.wolfram.com/language/ref/TextString.html.
Text
Wolfram Research (2014), TextString, Wolfram Language function, https://reference.wolfram.com/language/ref/TextString.html.
Wolfram Research (2014), TextString, Wolfram Language function, https://reference.wolfram.com/language/ref/TextString.html.
CMS
Wolfram Language. 2014. "TextString." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TextString.html.
Wolfram Language. 2014. "TextString." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TextString.html.
APA
Wolfram Language. (2014). TextString. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TextString.html
Wolfram Language. (2014). TextString. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TextString.html
BibTeX
@misc{reference.wolfram_2025_textstring, author="Wolfram Research", title="{TextString}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/TextString.html}", note=[Accessed: 03-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_textstring, organization={Wolfram Research}, title={TextString}, year={2014}, url={https://reference.wolfram.com/language/ref/TextString.html}, note=[Accessed: 03-June-2025
]}