[Proposal] Add module for C-strings support in Phobos
Adam D. Ruppe
destructionator at gmail.com
Sat Mar 22 06:21:44 PDT 2014
On Saturday, 22 March 2014 at 13:01:11 UTC, Nordlöw wrote:
> gives same error
That's because you made the alias local, UFCS only works with
global symbols right now (which is actually by design, though I
don't think it is a great design). So this works:
// move these out to module scope
import std.string;
alias z = toStringz;
unittest {
import std.stdio: wln = writeln;
wln(typeof("a".z).stringof); // now we're good/
}
More information about the Digitalmars-d
mailing list