Invert a range of bits in bitString.

Synopsis

Declared in <bdlb_bitstringutil.h>

static
void
toggle(
    uint64_t* bitString,
    std::size_t index,
    std::size_t numBits);

Description

Invert the values of the specified numBits in the specified bitString beginning at the specified index. The behavior is undefined unless bitString has a length of at least index + numBits.

Parameters

Name

Description

bitString

bit string to modify

index

starting bit position

numBits

number of bits to invert

Created with MrDocs