String templates
A String template is an easy way to concatenate text and the string
value of
other expressions.
Usage
void example(String name, DateTime now) {
"Hello ``name``, good ``timeOfDay(now)``!";
}
Description
Syntax
A string template is simply a String literal containing paired double backticks, between which are the expressions which get interpolated into the resulting String.
Type
The type of a String template is String
.
See also
- String templates in the spec