---
title: "CFBitVectorSetCount(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfbitvectorsetcount(_:_:)"
---

# CFBitVectorSetCount(_:_:)

Changes the size of a mutable bit vector.

## Declaration

```swift
func CFBitVectorSetCount(_ bv: CFMutableBitVector!, _ count: CFIndex)
```

## Parameters

- `bv`: The bit vector to modify.
- `count`: The new size for bv. If count is greater than the current size of bv, the additional bit values are set to 0.

## Discussion

Discussion If bv was created with a fixed capacity, you cannot increase its size beyond that capacity.

## See Also

### Related Documentation

- [CFBitVectorCreateMutable(_:_:)](corefoundation/cfbitvectorcreatemutable(_:_:).md)
- [CFBitVectorCreateMutableCopy(_:_:_:)](corefoundation/cfbitvectorcreatemutablecopy(_:_:_:).md)
- [CFBitVectorGetCount(_:)](corefoundation/cfbitvectorgetcount(_:).md)

### Modifying a Bit Vector

- [CFBitVectorFlipBitAtIndex(_:_:)](corefoundation/cfbitvectorflipbitatindex(_:_:).md)
- [CFBitVectorFlipBits(_:_:)](corefoundation/cfbitvectorflipbits(_:_:).md)
- [CFBitVectorSetAllBits(_:_:)](corefoundation/cfbitvectorsetallbits(_:_:).md)
- [CFBitVectorSetBitAtIndex(_:_:_:)](corefoundation/cfbitvectorsetbitatindex(_:_:_:).md)
- [CFBitVectorSetBits(_:_:_:)](corefoundation/cfbitvectorsetbits(_:_:_:).md)
