bts

fnint bts(size_t * p, size_t bitnum) pure @system

Tests and sets the bit.

Parameters

pa non-NULL pointer to an array of size_ts.
bitnuma bit number, starting with bit 0 of p[0], and progressing. It addresses bits like the expression:
p[index / (size_t.sizeof*8)] & (1 << (index & ((size_t.sizeof*8) - 1)))

Returns

A non-zero value if the bit was set, and a zero

if it was clear.