Converting between Expressions & Strings
Expressions in the Wolfram Language can be represented as strings in a variety of ways, for display, export, or processing. The Wolfram Language provides powerful functions for formatting expressions as strings, and for parsing strings to determine the expressions they represent.
ToString — convert any expression to a string
ToExpression — convert a string to an expression
TextString — give a human-readable string version of an expression, eliding as needed
Format Types »
InputForm ▪ OutputForm ▪ StandardForm ▪ TraditionalForm ▪ TeXForm ▪ DisplayForm ▪ ...
SyntaxQ, SyntaxLength — test syntactic correctness of input strings
ImportString — import strings in many file and other formats to give expressions
ExportString — export expressions to give many formats of strings
Interpreter — define how a string should be interpreted
SemanticInterpretation — interpret a string semantically with a particular target
SemanticImportString — interpret a string semantically as a structured dataset
LLM-Based Operations »
LLMResourceFunction — convert to or from text using prewritten prompts
LLMFunction ▪ LLMExampleFunction ▪ LLMSynthesize ▪ ...
Special Conversions
IntegerString — convert an integer to a string
DateList, DateString — convert between string and list forms of dates
Symbol, SymbolName — convert between strings and symbols
SpokenString — convert to a spoken representation of an expression
LetterNumber, FromLetterNumber — convert a to 1, b to 2, etc.
Images
ImageSynthesize — synthesize an image from a textual description
ImageContents — generate a textual description of the content of an image