testBit method

bool testBit(
  1. int index
)

Tests if the bit at index is set (1).

Implementation

bool testBit(int index) {
  if (index < 0) {
    throw RangeError.value(index, 'index', 'Must be non-negative');
  }
  return (_converter.bits & (BigInt.one << index)) != BigInt.zero;
}