---
title: "CFSetContainsValue(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfsetcontainsvalue(_:_:)"
---

# CFSetContainsValue(_:_:)

Returns a Boolean that indicates whether a set contains a given value.

## Declaration

```swift
func CFSetContainsValue(_ theSet: CFSet!, _ value: UnsafeRawPointer!) -> Bool
```

## Parameters

- `theSet`: The set to search.
- `value`: The value to match in theSet. Comparisons are made using the equal callback provided when theSet was created. If the equal callback was NULL, pointer equality (in C, ==) is used.

## Return Value

Return Value true if value is contained in theSet, otherwise false.

## Discussion

Discussion This function uses the equal callback. value and all elements in the set must be understood by the equal callback.

## See Also

### Examining a Set

- [CFSetGetCount(_:)](corefoundation/cfsetgetcount(_:).md)
- [CFSetGetCountOfValue(_:_:)](corefoundation/cfsetgetcountofvalue(_:_:).md)
- [CFSetGetValue(_:_:)](corefoundation/cfsetgetvalue(_:_:).md)
- [CFSetGetValueIfPresent(_:_:_:)](corefoundation/cfsetgetvalueifpresent(_:_:_:).md)
- [CFSetGetValues(_:_:)](corefoundation/cfsetgetvalues(_:_:).md)
