bitfiddle ~master

A library that makes fiddling with bits easy as calling a function.


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

BitFiddle

alt text

Bit fiddle functions set set and test bits in integer

Functions

Bit Testing Functions

bool testBit(T)(const T bitfield, const ulong idx) if(isIntegral!T);

bool testAnyBit(T)(const T bitfield) if(isIntegral!T);

bool testNoBit(T)(const T bitfield) if(isIntegral!T);

bool testAllBit(T)(const T bitfield) if(isIntegral!T);

Bit Setting Functions

T setBit(T)(const T bitfield, const ulong idx) if(isIntegral!T);

T setBit(T)(const T bitfield, const ulong idx, bool value) if(isIntegral!T);

T flipBit(T)(const T bitfield, const ulong idx) if(isIntegral!T);

T resetBit(T)(const T bitfield, const ulong idx) if(isIntegral!T);
Authors:
  • burner
Dependencies:
none
Versions:
0.0.6 2016-Oct-18
0.0.5 2016-Aug-02
0.0.4 2016-Aug-02
0.0.3 2016-Aug-02
0.0.2 2016-Aug-02
Show all 7 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 100 downloads total

Score:
0.6
Short URL:
bitfiddle.dub.pm