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


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



The set to search.


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

true if value is contained in theSet, otherwise false.


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

func CFSetGetCount(CFSet!) -> CFIndex

Returns the number of values currently in a set.

func CFSetGetCountOfValue(CFSet!, UnsafeRawPointer!) -> CFIndex

Returns the number of values in a set that match a given value.

func CFSetGetValueIfPresent(CFSet!, UnsafeRawPointer!, UnsafeMutablePointer<UnsafeRawPointer?>!) -> Bool

Reports whether or not a value is in a set, and if it exists returns the value indirectly.