findIndex

fun IntArray.findIndex(element: Int): Int
fun LongArray.findIndex(element: Long): Int
fun Array<String>.findIndex(element: String): Int

If the array is empty, -1 is returned.

Return

the index of the first occurrence of the element

Parameters

element

the element to search for