Instance MethodSwift

index(of:)

Returns the first index where the specified value appears in the collection.

  • Available when Self.Element conforms to Equatable

  • Deprecated since Swift 5.0

func index(of element: Self.Element) -> Self.Index?