Hexadecimal string to integer

Johann MacDonagh johann.macdonagh.no at spam.gmail.com
Tue Aug 2 17:32:38 PDT 2011


On 8/2/2011 8:17 PM, Stijn Herreman wrote:
> std.conv does not support conversion from a hexadecimal string to an
> integer. Is there a technical reason for this limitation?
>
> This is the best I could do, can it be improved still?
> int i = to!int(parse!float("0x1ap0"));

parse!int("1a", 16);


More information about the Digitalmars-d-learn mailing list