String literals are string values written directly in the program text.
A string literal starts with double quotes. The follows a sequence of characters (see below for details) ending with an unescaped double quote.
Characters
See the documentation on text for the complete details of which characters can be entered.
The following table holds the exceptions.
Character | String literal |
---|---|
Horizontal Tab, \t |
\t |
Line Feed, \n |
\n |
Carriage Return*, \r |
\r |
“ | \" |
\ | \\ |
Other character values
Other character values are impossible.
Other character values
To include other characters in a string use the following syntax: \uAAAA
, where AAAA is the 16-bit unicode code point in hex notation.
Multi line strings
Multi line string literals are impossible.