String Literal Syntax#

Dylan Enhancement Proposal (DEP) 12 extends the literal syntax for strings to include strings without any escape character processing (“raw” strings) and multi-line strings. Briefly,

  1. Multi-line strings begin with three double-quote characters: """

  2. End-of-line sequences in multi-line strings are always parsed as a single Newline (\n) character, regardless of source file line endings or the conventions of the operating system.

  3. Any string, whether delimited by " or """ may be prefixed with #r or #R to disable escape sequence processing.

  4. Any leading whitespace that matches the whitespace preceding the end ``”””`` delimiter is removed, allowing multi-line strings to be formatted nicely in source code.

See DEP 12 for details.