Files
java-core-examples/strings/output/02-text-blocks.txt
T

31 lines
742 B
Plaintext

--- closing delimiter on its own line, aligned with the text ---
{\n
.."id":.1\n
}\n
--- closing delimiter right after the last line (no final newline) ---
{\n
.."id":.1\n
}
--- closing delimiter 2 columns left of the text: 2 spaces of indentation survive ---
..left\n
--- trailing spaces are stripped, but \s and \040 survive ---
x....\n
y.\n
--- backslash at end of line joins the lines ---
one.line\n
--- escapes are processed after indentation is stripped ---
tab: |\n
--- double quotes need no escape; only a run of three does ---
say."hi".and."""\n
two identical text blocks are the same pooled instance: true
equals the hand-written literal: true
--- formatted() is the built-in way to interpolate ---
Hello,.Ann!.You.are.30.\n