Set the number of bits in this array to newLength.
Declared in <bdlc_bitarray.h>
void
setLength(
std::size_t newLength,
bool value = false);
Set the number of bits in this array to the specified newLength. If newLength < length(), bits at index positions at or above newLength are removed; otherwise, any new bits (at or above the current length) are initialized to the optionally specified value, or to 0 if value is not specified.
| Name | Description |
|---|---|
| newLength | new length of this array, in bits |
| value | initial value for any newly added bits |