flâneur

Data Types - Nix Reference Manual

nix.dev · saved by 1 readers

The most common way is to enclose the string between double quotes, e.g., "foo bar". Strings can span multiple lines. The special characters " and \ and the character sequence ${ must be escaped by prefixing them with a backslash (\). Newlines, carriage returns and tabs can be written as \n, \r and \t, respectively. You can include the results of other expressions into a string by enclosing them in ${ }, a feature known as string interpolation. The second way to write string literals is as an indented string, which is enclosed between pairs of double single-quotes, like so: This kind of string literal intelligently strips indentation from the start of each line. To be precise, it strips from each line a number of spaces equal to the minimal indentation of the string as a whole (disregarding the indentation of empty lines). For instance, the first and second line are indented two spaces, while the third line is indented four spaces. Thus, two spaces are stripped from each line, so the r

saved by