Function

CFArrayContainsValue

Reports whether or not a value is in an array.

Declaration

Boolean CFArrayContainsValue(CFArrayRef theArray, CFRange range, const void *value);

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

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

See Also

Examining an Array

CFArrayBSearchValues

Searches an array for a value using a binary search algorithm.

CFArrayGetCount

Returns the number of values currently in an array.

CFArrayGetCountOfValue

Counts the number of times a given value occurs in an array.

CFArrayGetFirstIndexOfValue

Searches an array forward for a value.

CFArrayGetLastIndexOfValue

Searches an array backward for a value.

CFArrayGetValues

Fills a buffer with values from an array.

CFArrayGetValueAtIndex

Retrieves a value at a given index.