Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/Here-document/D/here-document.d
Normal file
21
Task/Here-document/D/here-document.d
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import std.stdio, std.string;
|
||||
|
||||
void main() {
|
||||
// Delimited strings: a 'q' followed by double quotes and an
|
||||
// opening and closing delimiter of choice:
|
||||
|
||||
q"[a string that you "don't" have to escape]"
|
||||
.writeln;
|
||||
|
||||
// If the delimiter is an identifier, the identifier must be
|
||||
// immediately followed by a newline, and the matching delimiter
|
||||
// is the same identifier starting at the beginning of the line:
|
||||
|
||||
q"EOS
|
||||
This
|
||||
is a multi-line
|
||||
heredoc string
|
||||
EOS".outdent.writeln;
|
||||
|
||||
// std.string.outdent is used to remove the four spaces indent.
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue