---
title: "CFBitVectorGetFirstIndexOfBit(_:_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfbitvectorgetfirstindexofbit(_:_:_:)"
---

# CFBitVectorGetFirstIndexOfBit(_:_:_:)

Locates the first occurrence of a certain bit value within a range of bits in a bit vector.

## Declaration

```swift
func CFBitVectorGetFirstIndexOfBit(_ bv: CFBitVector!, _ range: CFRange, _ value: CFBit) -> CFIndex
```

## Parameters

- `bv`: The bit vector to examine.
- `range`: The range of bits in bv to search.
- `value`: The bit value for which to search.

## Return Value

Return Value The index of the first occurrence of value in the specified range of bv, or kCFNotFound if value is not present.

## See Also

### Getting Information About a Bit Vector

- [CFBitVectorContainsBit(_:_:_:)](corefoundation/cfbitvectorcontainsbit(_:_:_:).md)
- [CFBitVectorGetBitAtIndex(_:_:)](corefoundation/cfbitvectorgetbitatindex(_:_:).md)
- [CFBitVectorGetBits(_:_:_:)](corefoundation/cfbitvectorgetbits(_:_:_:).md)
- [CFBitVectorGetCount(_:)](corefoundation/cfbitvectorgetcount(_:).md)
- [CFBitVectorGetCountOfBit(_:_:_:)](corefoundation/cfbitvectorgetcountofbit(_:_:_:).md)
- [CFBitVectorGetLastIndexOfBit(_:_:_:)](corefoundation/cfbitvectorgetlastindexofbit(_:_:_:).md)
