July 15, 2009 std.conv question. | ||||
---|---|---|---|---|
| ||||
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; |
July 15, 2009 Re: std.conv question. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Q | 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.
|
Copyright © 1999-2021 by the D Language Foundation