index(before:)
Returns the position immediately before the given index.
func index(before i: Int) -> Int
Parameters
- i
A valid index of the collection.
i
must be greater thanstartIndex
.
Returns
The index immediately before i
.
Returns the position immediately before the given index.
func index(before i: Int) -> Int
A valid index of the collection. i
must be greater than startIndex
.
The index immediately before i
.