Strings are created by enclosing Unicode characters in double quotes. You Strings are UTF-8 encoded.
Special characters
The only special character is "
. You can put a double quote inside a string by escaping it with a backslash:
...
|
...
|
...
|
...
can |
...
put |
...
a |
...
quote |
...
character, |
...
\", |
...
in |
...
my |
...
string |
...
using |
...
a |
...
backslash" |
Strings can span multiple lines:
Code Block | ||||
---|---|---|---|---|
| ||||
a = "how to add a'
' character"
// -> "how to add a '\n' character" |
Strings are UTF-8 encoded.A newline (\n) requires a line break:
|
Other characters can be inserted literally, although some text editors are better at this than others.
Issues
- Escaping backslashes: https://github.com/Picolab/pico-engine/issues/284