# multiline strings

Multi-line strings

A multi-line literal string starts and ends with triple quotes:


var String s;
s = """
today
is the
day to be happy
""";



A special multi-line literal string starts with |”””, with the | character before the quotes. Both | and all characters before it in the current line are eliminated. Every | should be in a different line, although there may be empty lines between two lines. All | characters should be in the same column. All white spaces before the closing “”” are removed. The result is a multi-line string in which | delimited the start of each line.


var String s;
s = |"""
|today
|is the
|day to be happy
""";



A literal string can also be represented by “symbols”. A symbol starts with # followed, without spaces, by letters, dot, digits, underscore, and any number of :´s, as:


#f #age #age:



A single-quote literal string may start with n” or N” to disable any escape character inside the string:


var fileName = n"D:\User\Carol\My Texts\text01";
assert n"D:\User\Carol\My Texts\text01" == "D:\\User\\Carol\\My Texts\\text01";



Of course, variable interpolation with \$ works with multi-line literal strings.