indexes(ofObjectsPassingTest:)
Returns the index of the object in the ordered set that passes a test in a given block.
Declaration
func indexes(ofObjectsPassingTest predicate: (Any, Int, UnsafeMutablePointer<ObjCBool>) -> Bool) -> IndexSetParameters
- predicate:
The block to apply to elements in the ordered set.
The block takes three arguments:
Return Value
The index of the corresponding value in the ordered set that passes the test specified by predicate. If no objects in the ordered set pass the test, returns NSNotFound..
Discussion
If the block parameter is nil, this method raises an exception.
See Also
Accessing Set Members
contains(_:)enumerateObjects(at:options:using:)enumerateObjects(_:)enumerateObjects(options:using:)firstObjectlastObjectobject(at:)subscript(_:)objects(at:)index(of:)index(of:inSortedRange:options:usingComparator:)index(ofObjectAt:options:passingTest:)index(ofObjectPassingTest:)index(_:ofObjectPassingTest:)indexes(ofObjectsAt:options:passingTest:)