Instance MethodSwift
index(of:)
Returns the first index where the specified value appears in the collection.
Available because
Self
conforms toCollection
.Available when
Self.Element
conforms toEquatable
- Deprecated since Swift 5.0
func index(of element: Self.Element) -> Self.Index?