What should I use for concat string into array in loop?
H. S. Teoh
hsteoh at quickfur.ath.cx
Tue Feb 13 01:56:45 UTC 2018
On Tue, Feb 13, 2018 at 01:58:42AM +0000, Marc via Digitalmars-d-learn wrote:
> appender doesn't support string[] so in such case:
Why not? This seems to work:
import std.array;
import std.stdio;
void main() {
auto app = appender!(string[]);
foreach (i; 0 .. 1000) {
app.put("abc");
}
writeln(app.data);
}
T
--
"You are a very disagreeable person." "NO."
More information about the Digitalmars-d-learn
mailing list