std.conv question.

BCS ao at pathlink.com
Wed Jul 15 13:30:05 PDT 2009


Reply to Q,

> Does to! (uint) recognize  hexadecimal strings?
> Cause if i put
> int by = to!(int)("0x0FFF");
> throws an exception saying;
> std.conv.ConvError: Can't convert value `x0FFF' of type const(char)[]
> to type int
> dmd 2.031;

BTW: You have posted three copties of the same question.

IIRC there is a function that parses hex but clealy 'to' is not it. Grep 
the docs for "hex" and it should pop up.




More information about the Digitalmars-d-learn mailing list