Skip to content

BitVecEmpty

BitVecEmpty

Description

Check if bitvector is empty.

Parameters

Name Direction Description
bv in Bitvector to check

Usage example (from documentation)

  if (BitVecEmpty(&flags)) { /* handle empty case */ }

Returns

true if bitvector has no bits, false otherwise

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