[#BloombergLP-bdlb-BitStringUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::BitStringUtil :relfileprefix: ../../ :mrdocs: Namespace for bit‐string utility functions. == Synopsis Declared in `<bdlb_bitstringutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct BitStringUtil; ---- == Description This `struct` provides a namespace for a suite of static functions to manipulate and access sequences of bits stored in an array of `uint64_t` (also known as a "bit string"; see {The "Bit String" Pseudo‐Type}). == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/BitStringUtil/_04enum.adoc[`Unnamed enum`] | Bit‐string utility constants. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/BitStringUtil/andEqual.adoc[`andEqual`] | Bitwise AND corresponding bits of two bit strings. | xref:BloombergLP/bdlb/BitStringUtil/areEqual-0a.adoc[`areEqual`] | `areEqual` overloads | xref:BloombergLP/bdlb/BitStringUtil/assign-01.adoc[`assign`] | `assign` overloads | xref:BloombergLP/bdlb/BitStringUtil/assign0-04.adoc[`assign0`] | `assign0` overloads | xref:BloombergLP/bdlb/BitStringUtil/assign1-07.adoc[`assign1`] | `assign1` overloads | xref:BloombergLP/bdlb/BitStringUtil/assignBits.adoc[`assignBits`] | Assign bits from `srcValue` into `bitString`. | xref:BloombergLP/bdlb/BitStringUtil/bit.adoc[`bit`] | Return the bit value at the specified `index` in `bitString`. | xref:BloombergLP/bdlb/BitStringUtil/bits.adoc[`bits`] | Return a range of bits from `bitString` as an integer. | xref:BloombergLP/bdlb/BitStringUtil/copy.adoc[`copy`] | Copy bits from a source bit string into a destination bit string. | xref:BloombergLP/bdlb/BitStringUtil/copyRaw.adoc[`copyRaw`] | Copy bits between bit strings that do not overlap adversely. | xref:BloombergLP/bdlb/BitStringUtil/find0AtMaxIndex-03.adoc[`find0AtMaxIndex`] | `find0AtMaxIndex` overloads | xref:BloombergLP/bdlb/BitStringUtil/find0AtMinIndex-05.adoc[`find0AtMinIndex`] | `find0AtMinIndex` overloads | xref:BloombergLP/bdlb/BitStringUtil/find1AtMaxIndex-09.adoc[`find1AtMaxIndex`] | `find1AtMaxIndex` overloads | xref:BloombergLP/bdlb/BitStringUtil/find1AtMinIndex-05.adoc[`find1AtMinIndex`] | `find1AtMinIndex` overloads | xref:BloombergLP/bdlb/BitStringUtil/insert.adoc[`insert`] | Insert bits of a given value into a bit string. | xref:BloombergLP/bdlb/BitStringUtil/insert0.adoc[`insert0`] | Insert 0 bits into a bit string. | xref:BloombergLP/bdlb/BitStringUtil/insert1.adoc[`insert1`] | Insert 1 bits into a bit string. | xref:BloombergLP/bdlb/BitStringUtil/insertRaw.adoc[`insertRaw`] | Insert uninitialized bits into a bit string. | xref:BloombergLP/bdlb/BitStringUtil/isAny0.adoc[`isAny0`] | Return whether any bit in a range of `bitString` is 0. | xref:BloombergLP/bdlb/BitStringUtil/isAny1.adoc[`isAny1`] | Return whether any bit in a range of `bitString` is 1. | xref:BloombergLP/bdlb/BitStringUtil/minusEqual.adoc[`minusEqual`] | Bitwise MINUS corresponding bits of two bit strings. | xref:BloombergLP/bdlb/BitStringUtil/num0.adoc[`num0`] | Return the number of 0 bits in a range of `bitString`. | xref:BloombergLP/bdlb/BitStringUtil/num1.adoc[`num1`] | Return the number of 1 bits in a range of `bitString`. | xref:BloombergLP/bdlb/BitStringUtil/orEqual.adoc[`orEqual`] | Bitwise OR corresponding bits of two bit strings. | xref:BloombergLP/bdlb/BitStringUtil/print.adoc[`print`] | Format a bit string to an output stream in hexadecimal. | xref:BloombergLP/bdlb/BitStringUtil/remove.adoc[`remove`] | Remove bits from a bit string, shifting higher bits down. | xref:BloombergLP/bdlb/BitStringUtil/removeAndFill0.adoc[`removeAndFill0`] | Remove bits and fill vacated high‐order bits with 0. | xref:BloombergLP/bdlb/BitStringUtil/removeAndFill1.adoc[`removeAndFill1`] | Remove bits and fill vacated high‐order bits with 1. | xref:BloombergLP/bdlb/BitStringUtil/swapRaw.adoc[`swapRaw`] | Exchange non‐overlapping bit ranges between two bit strings. | xref:BloombergLP/bdlb/BitStringUtil/toggle.adoc[`toggle`] | Invert a range of bits in `bitString`. | xref:BloombergLP/bdlb/BitStringUtil/xorEqual.adoc[`xorEqual`] | Bitwise XOR corresponding bits of two bit strings. |=== == Static Data Members [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/BitStringUtil/k_INVALID_INDEX.adoc[`k_INVALID_INDEX`] | Sentinel index value indicating an invalid bit position. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#