Required Instance Methodswift 6.0.1Swift
formIndex(after:)
Replaces the given index with its successor.
override func formIndex(after i: inout Self.Index)
Parameters
- i
A valid index of the collection.
i
must be less thanendIndex
.
Restates
func formIndex(after: inout Self.Index
) Replaces the given index with its successor.
Other requirements
Type members
Instance members
var endIndex: Self.Index
var indices: Self.Indices
The indices that are valid for subscripting the collection, in ascending order.
var startIndex: Self.Index
subscript(Range<Self.Index>
) -> Self.SubSequence Accesses a contiguous subrange of the collection’s elements.
subscript(Self.Index
) -> Self.Element func distance(from: Self.Index, to: Self.Index
) -> Int Returns the distance between two indices.
func formIndex(before: inout Self.Index
) Replaces the given index with its predecessor.
func index(Self.Index, offsetBy: Int
) -> Self.Index Returns an index that is the specified distance from the given index.
func index(Self.Index, offsetBy: Int, limitedBy: Self.Index
) -> Self.Index? Returns an index that is the specified distance from the given index, unless that distance is beyond a given limiting index.
func index(after: Self.Index
) -> Self.Index Returns the position immediately after the given index.
func index(before: Self.Index
) -> Self.Index Returns the position immediately before the given index.