Where can get the Number Convert module?Thanks.
Jonathan M Davis
newsgroup.d at jmdavisprog.com
Sun Jan 14 02:03:39 UTC 2018
On Sunday, January 14, 2018 01:45:37 FrankLike via Digitalmars-d-learn
wrote:
> Hi,everyone,
> I need some help on 'Number Convert module' in D,such as
> byte[] type to BinaryDigit.
> Where can get the module?
>
> Thanks.
Well, I'm not quite sure what you mean, but if you mean that you want to
take a ubyte[] and do something like take arr[0 .. 4] and convert that to
int, then you should check out
https://dlang.org/phobos/std_bitmanip.html
In particular,
https://dlang.org/phobos/std_bitmanip.html#bigEndianToNative
https://dlang.org/phobos/std_bitmanip.html#peek
https://dlang.org/phobos/std_bitmanip.html#read
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list