GetIndexOf

Kategorie: Script / Arrays
Ab Engineversion: 1.0 OC

Beschreibung

Finds the first occurrence of a value in an array and returns its zero-based index. If the element is not found, -1 is returned. The usual rules for comparison using the ==-operator apply.

Syntax

int GetIndexOf(array array2search, any needle);

Parameter

array2search:
Array in which the element should be searched. The array can be zero, in which case the element is never found and -1 is returned.
needle:
The value to which every element of the array is to be compared.
Sven2, 2012-12