---
title: "CFArrayContainsValue(_:_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfarraycontainsvalue(_:_:_:)"
---

# CFArrayContainsValue(_:_:_:)

Reports whether or not a value is in an array.

## Declaration

```swift
func CFArrayContainsValue(_ theArray: CFArray!, _ range: CFRange, _ value: UnsafeRawPointer!) -> Bool
```

## Parameters

- `theArray`: The array to search.
- `range`: The range within theArray to search. The range must not exceed the bounds of theArray). The range may be empty (length 0).
- `value`: The value to match in theArray. The equal callback provided when theArray was created is used to compare. If the equal callback was NULL, pointer equality (in C, ==) is used. If value, or any other value in theArray, is not understood by the equal callback, the behavior is undefined.

## Return Value

Return Value true, if value is in the specified range of theArray, otherwise false.

## See Also

### Examining an Array

- [CFArrayBSearchValues(_:_:_:_:_:)](corefoundation/cfarraybsearchvalues(_:_:_:_:_:).md)
- [CFArrayGetCount(_:)](corefoundation/cfarraygetcount(_:).md)
- [CFArrayGetCountOfValue(_:_:_:)](corefoundation/cfarraygetcountofvalue(_:_:_:).md)
- [CFArrayGetFirstIndexOfValue(_:_:_:)](corefoundation/cfarraygetfirstindexofvalue(_:_:_:).md)
- [CFArrayGetLastIndexOfValue(_:_:_:)](corefoundation/cfarraygetlastindexofvalue(_:_:_:).md)
- [CFArrayGetValues(_:_:_:)](corefoundation/cfarraygetvalues(_:_:_:).md)
- [CFArrayGetValueAtIndex(_:_:)](corefoundation/cfarraygetvalueatindex(_:_:).md)
