pub fn isSet(self: Self, index: usize) bool
Returns true if the bit at the specified index is present in the set, false otherwise.
self: Self
index: usize
412 413 414 415 416
pub fn isSet(self: Self, index: usize) bool { assert(index < bit_length); if (num_masks == 0) return false; // doesn't compile in this case return (self.masks[maskIndex(index)] & maskBit(index)) != 0; }
Returns true if the bit at the specified index is present in the set, false otherwise.