bitmanip bigEndianToNative using a buffer slice?

Lucas Burson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Oct 21 18:30:48 PDT 2014


On Wednesday, 22 October 2014 at 01:08:52 UTC, ketmar via 
Digitalmars-d-learn wrote:
> the short answer:
>
>  uint fromBuf =
>  bigEndianToNative!uint(cast(ubyte[4])buffer[offset..offset+4]);
>

ketmar, we meet again! Your explanation is great and that solved 
my problem. Thank you. Maybe I'll try out templates next...


More information about the Digitalmars-d-learn mailing list