Note: information on this page refers to Ceylon 1.0, not to the current release.

String templates

A String template is a easy was 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