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 usingbut this doesn't feel right... with 2 to calls. Is this the way to go? Or is there something better?long foo = to!long( to!string(bar) );Mars
This seems to work: char[] c = "123\0".dup; auto l = parse!long(c); writeln( l );