index(after:)
Returns the position immediately after the given index.
func index(after: Index) -> Index
Parameters
- after
A valid index of the collection.
i
must be less thanendIndex
.
Returns
The index value immediately after i
.
The successor of an index must be well defined. For an index i
into a collection c
, calling c.index(after: i)
returns the same index every time.