RosettaCodeData/Task/Repeat-a-string/D/repeat-a-string-2.d
2023-07-01 13:44:08 -04:00

8 lines
210 B
D

import std.stdio;
void main() {
char[] chars; // create the dynamic array
chars.length = 5; // set the length
chars[] = '*'; // set all characters in the string to '*'
writeln(chars);
}