I want to write a variadic function that should have 1 parameter that is not optional of type string and a second string that is optional. I have read the language spec about variadic functions but considering D's many options I would like to know which is the appropriate solution for my problem.
Also how should I use cast and pointer for copying the string pointed by the void* _argptr (the fact that strings are immutable in D confuses me I guess).
Edit: What I want is something like:
string foo (string nonopt, ...) { /*code*/ }
//...
string a = "[email protected]", b = "a.t";
auto s = foo(a);
auto s2 = foo(a, b);
By your standards every noob is a cargo cult programmeris just flat-out wrong, but nice strawman. - Lightness Races in Orbit