String to int exception
Alexandre via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jul 15 05:24:47 PDT 2014
Thanks, but, when I convert I recive a 'c' in the front of my
number...
uint reverseBytes(uint val)
{
import core.bitop : bitswap;
return bitswap(val);
}
//...
writefln("%x", reverseBytes(0x00402030));
//...
// output: c040200
On Tuesday, 15 July 2014 at 12:16:26 UTC, bearophile wrote:
>
> See also core.bitop.bswap.
>
> Bye,
> bearophile
More information about the Digitalmars-d-learn
mailing list