24.01.2012 22:48, Mars пишет:
Hello everybody.
I have to convert a char* (from a C function) to long. At the moment I'm using
long foo = to!long( to!string(bar) );
but this doesn't feel right... with 2 to calls. Is this the way to go? Or is there something better?

Mars

This seems to work:

char[] c = "123\0".dup;
auto l = parse!long(c);
writeln( l );

Reply via email to