ubyte arrays to numbers
lurker
lurker at lurker.com
Mon Apr 7 11:26:25 PDT 2008
do you know of any prefab functions of templates?
Leandro Lucarella Wrote:
> lurker, el 7 de abril a las 11:43 me escribiste:
> > hi,
> >
> > is there any good and easy way to convert ubyte arrays to short, ushort, int, uint long and ulong?
>
> if the byte order is correct, a cast should do it, if not, htons and htonl
> should help (for longs, I think you have to roll your own hton).
>
> --
> Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
> ----------------------------------------------------------------------------
> GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05)
> ----------------------------------------------------------------------------
> SATANAS EN COMISARIA
> -- Crónica TV
More information about the Digitalmars-d-learn
mailing list