Text and string literals

Syntax and values

A text literal is text written directly between quotes in your source. An escape sequence starts with a backslash and lets you include special characters, such as a quote or newline. Try the escape examples.

Text literals use double quotes and stay on one physical line:

"Hello"
"Pliro 🐢"
""

Supported escapes are:

Escape Meaning
\" Double quote
\\ Backslash
\n Newline character
\r Carriage return character
\t Tab character inside the resulting text

Unknown escapes are errors. Pliro does not currently have single-quoted, raw,
triple-quoted, multiline, interpolated, or \u escape syntax. Direct Unicode
characters are allowed in source.

Text length, indexing, and iteration count Unicode code points rather than UTF-8
bytes. Text values are immutable.

Example

# language: en
let label = "Pliro 🐢"
say label
say length(label)

Syntax and values · Built-ins · Programming guides