The OpenD Programming Language

BitArray.dup

Duplicates the BitArray and its contents.

struct BitArray
@property const pure nothrow
dup
()

Examples

BitArray a;
BitArray b;

a.length = 3;
a[0] = 1; a[1] = 0; a[2] = 1;
b = a.dup;
assert(b.length == 3);
foreach (i; 0 .. 3)
    assert(b[i] == (((i ^ 1) & 1) ? true : false));

Meta