remove(_:in:)
Removes all occurrences within a specified range in the array of a given object.
Declaration
func remove(_ anObject: Any, in range: NSRange)Parameters
- anObject:
The object to be removed from the array’s content.
- range:
The range from which to remove
anObject.
Discussion
Matches are determined by comparing anObject to the objects in the receiver using the isEqual: method. If the array does not contain anObject within aRange, the method has no effect (although it does incur the overhead of searching the contents).