WLJS LogoWLJS Notebook

ToString

ToString[expr] gives a string corresponding to the printed form of expr.

ToString[expr, form] gives the string in the specified form.

Examples

Convert expression to string:

ToString[123]
(* "123" *)

ToString[x^2 + 1]
(* "1 + x^2" *)

Please visit the official Wolfram Language Reference for more details.

On this page