Returns the position immediately before the given index.
SDK
Framework
On This Page
func index(before i: Int) -> Int
i
A valid index of the collection. i must be greater than startIndex.
startIndex
The index value immediately before i.
BidirectionalCollection
RandomAccessCollection