Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

String

Constructors

ConstructorFieldsDescription
DoubleQuotedcontents: [Antiquoted Text]Standard string "..."
Indentedindent: Int, parts: [Antiquoted Text]Multi-line indented string ''...''

Description

String represents the contents of a string literal (not the expression wrapper). The expression-level node is Str which wraps a String.

String parts are Antiquoted Text: either Plain text, Antiquoted expressions, or EscapedNewline (indented strings only).

Pages

String Parts (Antiquoted)

See Antiquoted for:

  • Plain: literal text
  • Antiquoted: embedded expression ${...}
  • EscapedNewline: \ newline in indented strings

Nix Library Access

syntax.mkStr (syntax.mkDoubleQuoted [syntax.mkPlain "hello"])
syntax.mkStr (syntax.mkIndented 2 [syntax.mkPlain "hello\nworld"])