Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1 @@
char c = 'a';

View file

@ -0,0 +1,4 @@
auto str = "hello"; // UTF-8
auto str2 = "hello"c; // UTF-8
auto str3 = "hello"w; // UTF-16
auto str4 = "hello"d; // UTF-32

View file

@ -0,0 +1,2 @@
auto str = `"Hello," he said.`;
auto str2 = r"\n is slash-n";

View file

@ -0,0 +1,4 @@
// Any character is allowed after the first quote;
// the string ends with that same character followed
// by a quote.
auto str = q"$"Hello?" he enquired.$";

View file

@ -0,0 +1,5 @@
// If you include a newline, you get a heredoc string:
auto otherStr = q"EOS
This is part of the string.
So is this.
EOS";

View file

@ -0,0 +1,4 @@
// The contents of a token string must be valid code fragments.
auto str = q{int i = 5;};
// The contents here isn't a legal token in D, so it's an error:
auto illegal = q{@?};

View file

@ -0,0 +1,2 @@
// assigns value 'hello' to str
auto str = x"68 65 6c 6c 6f";