lastIndexOf

Returns the index of the last occurrence of the specifed element

U
lastIndexOf
(
T
U = size_t
)
(
in T[] arr
,)

Parameters

arr T[]

the array to get the index of the element from

element T

the element to find the index of

Return Value

Type: U

the index of the last occurrence of the element in the specified array, or U.max if the element does not occur.

Throws

AssertException if the length of the array is 0 AssertException if the return value is less than -1 or greater than the length of the array - 1.

Meta