Description

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

Package Information

Version0.0.6 (2016-Oct-18)
Repository https://github.com/burner/bitfiddle
Licenseboost
CopyrightCopyright © 2016, burner
Authorsburner
Registered byRobert Schadek
Dependencies none

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

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);

Available versions

0.0.6 0.0.5 0.0.4 0.0.3 0.0.2 0.0.1 ~master