TextString

TextString[expr]

gives a human-readable string representation of expr.

Details and Options

Examples

open allclose all

Basic Examples  (3)

Convert an integer:

Convert a real number:

Convert a GeoPosition:

Convert a DateObject:

Convert a TimeObject:

Convert a Quantity:

Convert a list of elements:

Scope  (4)

By default, TextString converts certain built-in expressions to an elided string:

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

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

Row formats as a concatenation of its contents:

Column formats each element on a new line:

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

Options  (6)

AssociationFormat  (1)

By default, TextString formats associations as they normally appear in the Wolfram Language:

Use different delimiters:

BooleanStrings  (1)

By default, the symbols True and False format as themselves:

Specify different strings to use for the symbols True and False:

DateFormat  (1)

TextString uses the same default format as DateString:

Override the default date format:

ElidedForms  (1)

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

Ordinary symbolic expressions are formatted normally:

Elide specific symbolic expressions:

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

ListFormat  (1)

By default, TextString formats lists as they normally appear in the Wolfram Language:

Use different delimiters:

MissingString  (1)

By default, expressions with head Missing are ignored:

Specify a different string:

Use the given reason, if available:

Properties & Relations  (1)

UpValues can be defined for custom objects to determine how they should be formatted by TextString:

Possible Issues  (1)

Nesting Row and Column expressions does not produce a table:

Use TableForm to produce a table:

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.

CMS

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

BibTeX

@misc{reference.wolfram_2023_textstring, author="Wolfram Research", title="{TextString}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/TextString.html}", note=[Accessed: 19-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_textstring, organization={Wolfram Research}, title={TextString}, year={2014}, url={https://reference.wolfram.com/language/ref/TextString.html}, note=[Accessed: 19-March-2024 ]}