Strings
In Gren, strings are zero or more characters contained within double quotes:
Character literals are exactly one character contained within single quotes:
Multi-line strings can be contained within three double quotes. Leading whitespace will be removed from the resulting string, but newlines will be preserved:
To include a double quote inside a string, it must be escaped with \
:
A single quote character literal can also be escaped:
And you can escape the \
itself with a preceding \
:
You do not need to escape double quotes from multiline strings:
You can combine two strings into one with ++
:
To see what else you can do with strings, check the String module documentation.