char* to long

mta`chrono chrono at mta-international.net
Tue Jan 24 14:52:18 PST 2012


Why not just go the "good old" way? you char* should be zero terminated
when coming from c.

====
private import  core.stdc.stdlib,
                std.stdio;

void main()
{
    const(char)* str = "1234567890".ptr;
    long lng = atoll(str);
    writeln(lng);
}
====



More information about the Digitalmars-d-learn mailing list