replaceObjects(in:with:count:)
Replaces the objects in the receiving mutable ordered set at the range with the specified number of objects from a given C array.
Declaration
func replaceObjects(in range: NSRange, with objects: UnsafePointer<AnyObject>?, count: Int)Parameters
- range:
The range of the objects to replace.
- objects:
A C array of objects.
- count:
The number of values from the objects C array to insert in place of the objects in
range. This number will be the count of the new array—it must not be negative or greater than the number of elements in objects.
Discussion
Elements are added to the new array in the same order they appear in objects, up to but not including index count.