tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
12
Task/Copy-a-string/D/copy-a-string.d
Normal file
12
Task/Copy-a-string/D/copy-a-string.d
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
void main() {
|
||||
string src = "This is a string";
|
||||
|
||||
// copy contents:
|
||||
auto dest1 = src.idup;
|
||||
|
||||
// copy contents to mutable char array
|
||||
auto dest2 = src.dup;
|
||||
|
||||
// copy just the fat reference of the string
|
||||
auto dest3 = src;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue