Instance MethodSwift

    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 than startIndex.

    Returns

    The index immediately before i.