init(_:within:)
Creates a new range set containing ranges that contain only the specified indices in the given collection.
Declaration
init<S, C>(_ indices: S, within collection: C) where Bound == S.Element, S : Sequence, C : Collection, S.Element == C.IndexParameters
- indices:
The indices to include in the range set. All members of
indicesmust be valid indicies ofcollectionthat aren’t equal to the collection’sendIndex. - collection:
The collection that contains
index.