Return a range of bits from bitString as an integer.
Declared in <bdlb_bitstringutil.h>
static
uint64_t
bits(
uint64_t const* bitString,
std::size_t index,
std::size_t numBits);
Return the specified numBits beginning at the specified index in the specified bitString as the low-order bits of the returned value. The behavior is undefined unless numBits <= k_BITS_PER_UINT64 and bitString has a length of at least index + numBits.
the selected bits as the low-order bits of the result
| Name | Description |
|---|---|
| bitString | bit string to read |
| index | starting bit position |
| numBits | number of bits to return |