WLJS LogoWLJS Notebook

StringTemplate

StringTemplate["string"] yields a TemplateObject expression that represents a string template to be applied to arguments.

StringTemplate[src] uses File[...], URL[...] as the source for the string template.

Examples

Create and apply a template:

template = StringTemplate["Hello, `name`!"];
template[<|"name" -> "World"|>]
(* "Hello, World!" *)

Positional arguments:

StringTemplate["`` + `` = ``"][2, 3, 5]
(* "2 + 3 = 5" *)

Please visit the official Wolfram Language Reference for more details.

On this page