test method

bool test(
  1. int index
)

Returns true if the bit at index is set.

Implementation

bool test(int index) {
  _checkBounds(index);
  final wordIndex = index ~/ 32;
  final bitIndex = index % 32;
  return (_words[wordIndex] & (1 << bitIndex)) != 0;
}