import std.file : write; import std.algorithm : substitute; const s = q{int $X = $Y;}; // templated source foreach (part; s.substitute("$X", "x", "$Y", "42")) write(somePath, part);
is my current best bet.
Per Nordlöw via Digitalmars-d-learn Tue, 27 Oct 2020 01:36:03 -0700
import std.file : write; import std.algorithm : substitute; const s = q{int $X = $Y;}; // templated source foreach (part; s.substitute("$X", "x", "$Y", "42")) write(somePath, part);
is my current best bet.