struct BitArray
- BitArray
- Struct
- Value
- Object
Overview
Seriously, what's the fun of having a BitArray type in Crystal's stdlib if you can't even do bitwise operations on them?! We'll have our fun here.
Included Modules
- Indexable::Mutable(Bool)
Defined in:
savi/ext/bit_array.crInstance Method Summary
-
#|(other : BitArray) : BitArray
Return a new BitArray whose bits are the union of those in self and other.
-
#intersection?(other : BitArray) : BitArray | Nil
Return a BitArray containing those bits that are in both self and other, or nil if there are no bits that intersect between the two.
Instance Method Detail
Return a new BitArray whose bits are the union of those in self and other. Raises an ArgumentError if the two BitArrays are not the same size.
Return a BitArray containing those bits that are in both self and other, or nil if there are no bits that intersect between the two. Raises an ArgumentError if the two BitArrays are not the same size. There are easier ways to do this, but we want to optimize for not producing a new BitArray unless it is absolutely necessary.