getIndex

The function returns the index of the array element by value.

getIndex
(
T
)

Parameters

haystack T[]

The array in which the search is performed.

needle T

Element value in the array.

Return Value

Type: ssize_t

The index of the array element. -1 if the element was not found.

Meta