String to int exception

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jul 15 05:16:25 PDT 2014


Alexandre:

> 	return (retVal & 0x000000FF) << 24 |
> 		   (retVal & 0x0000FF00) << 8 |
> 		   (retVal & 0x00FF0000) >> 8 |
> 		   (retVal & 0xFF000000) >> 24;

See also core.bitop.bswap.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list