String to int exception
safety0ff via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jul 15 07:15:17 PDT 2014
On Tuesday, 15 July 2014 at 12:24:48 UTC, Alexandre wrote:
> 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);
> }
You confused bswap with bitswap.
The former reverses bytes, the latter reverses bits.
If you look at bearophile's original message he says bswap.
More information about the Digitalmars-d-learn
mailing list