The OpenD Programming Language

BitArray.reverse

Reverses the bits of the BitArray.

struct BitArray
@property @nogc pure nothrow return
reverse
()
out (result) { assert (result == this, "the result must be equal to this"); }

Examples

BitArray b;
bool[5] data = [1,0,1,1,0];

b = BitArray(data);
b.reverse;
foreach (i; 0 .. data.length)
    assert(b[i] == data[4 - i]);

Meta