Can I output strings using core.stdc.stdio?
Adam D. Ruppe
destructionator at gmail.com
Wed Dec 23 13:55:20 UTC 2020
On Wednesday, 23 December 2020 at 13:06:37 UTC, drug wrote:
> static foreach (ulong i; 0..args.length) {
> static if (is(typeof(args[i]) == string))
> printf("%s\n", args[i].toStringz);
> static if (is(typeof(args[i]) == int))
Putting some `else` in there would help too to ensure your thing
only ever matches one branch.
doesn't matter here but will later if you add generic array
support.
and then there's const etc but that's yet another thing so wait
on that till you have the basics down
More information about the Digitalmars-d-learn
mailing list