Contents

insert(contentsOf:beforeIndex:)

Adds the specified sequence of entities to this collection in order, directly before the entity at the given index.

Declaration

mutating func insert<S>(contentsOf sequence: S, beforeIndex index: Int) where S : Sequence, S.Element : Entity

Parameters

  • sequence:

    A sequence of entities to add to the collection.

  • index:

    The index of an entity to insert in front of. If endIndex is provided, the entities will be appended.

Discussion