Remove bits from a bit string, shifting higher bits down.
Declared in <bdlb_bitstringutil.h>
static
void
remove(
uint64_t* bitString,
std::size_t length,
std::size_t index,
std::size_t numBits);
Remove the specified numBits from the specified bitString of the specified length beginning at the specified index. Bits above index + numBits are shifted down by numBits index positions and the length of bitString is reduced by numBits. The values of the vacated high-order bits are not modified. The behavior is undefined unless index + numBits <= length.
| Name | Description |
|---|---|
| bitString | bit string to modify |
| length | number of bits in bitString |
| index | starting bit position of the range to remove |
| numBits | number of bits to remove |