On 2/26/2020 2:02 AM, Juraj Mojzis wrote:
void print_many(string msg, int cnt = 1) {
     foreach(i; 0 .. cnt) writeln(msg);
}

int apple_cnt = 4;
print_many(i"I have $apple_cnt apples.");

expected: I have 4 apples.

Doing what you want would require a runtime GC allocated string.

Reply via email to