BitVecEmpty
Description
Check whether bitvector is empty.
Parameters
| Name | Direction | Description |
|---|---|---|
bv |
in | Bitvector to query. |
Usage example (from documentation)
if (BitVecEmpty(&flags)) { /* handle empty case */ }Success
Returns true when bitvector length is 0.
Failure
Returns false when the bitvector contains at least one bit. The bitvector is not modified.
Usage example (Cross-references)
Usage examples (Cross-references)
// Test empty check
result = result && !BitVecEmpty(&bv);
// Clear and check empty
// Clear and check empty
BitVecClear(&bv);
result = result && BitVecEmpty(&bv);
result = result && (BitVecLen(&bv) == 0); result = result && (BitVecLen(&bv) == 0);
result = result && (BitVecCapacity(&bv) == 0);
result = result && BitVecEmpty(&bv);
result = result && (BitVecByteSize(&bv) == 0); result = result && (BitVecLen(&bv) == 65);
result = result && (BitVecCapacity(&bv) >= 65);
result = result && !BitVecEmpty(&bv);
result = result && (BitVecByteSize(&bv) >= 9); // At least 9 bytes for 65 bits
Last updated on