insert(contentsOf:at:)

Inserts the elements of a sequence into the collection at the specified position.

SyntaxCollection.swift:302
mutating func insert(contentsOf newElements: some Collection<Element>, at i: Index)

Parameters

newElements

The new elements to insert into the collection.

i

The position at which to insert the new elements. index must be a valid index of the collection.