---
title: "CFBitVectorFlipBitAtIndex(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfbitvectorflipbitatindex(_:_:)"
---

# CFBitVectorFlipBitAtIndex(_:_:)

Flips a bit value in a bit vector.

## Declaration

```swift
func CFBitVectorFlipBitAtIndex(_ bv: CFMutableBitVector!, _ idx: CFIndex)
```

## Parameters

- `bv`: The bit vector to modify.
- `idx`: The index of the bit value to flip. The index must be in the range 0…N-1, where N is the count of the vector.

## See Also

### Related Documentation

- [CFBitVectorGetCount(_:)](corefoundation/cfbitvectorgetcount(_:).md)

### Modifying a Bit Vector

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