Return the number of 1 bits in a range of bitString.
Declared in <bdlb_bitstringutil.h>
static
std::size_t
num1(
uint64_t const* bitString,
std::size_t index,
std::size_t numBits);
Return the number of 1 bits in the specified numBits beginning at the specified index in the specified bitString. The behavior is undefined unless bitString has a length of at least index + numBits.
count of 1 bits in the examined range
| Name | Description |
|---|---|
| bitString | bit string to examine |
| index | starting bit position |
| numBits | number of bits to examine |