indexOf( array, item )item
is the first entry in the array, the return value
will be zero.
If the item does not appear in the array, -1 is returned. If it appears multiple times, the index of its first appearance is returned.
If indexOf(array, item)==n, then
array[n] is equal to item.
Note:
This documents the Object version of the routine.
Corresponding routines exist for other data types
(double, float, long,
int, short).
array (array of Object)item (Object)item in array,
or -1indexOf(stringArray("QSO", "BCG", "SNR"), "BCG")
= 1indexOf(stringArray("QSO", "BCG", "SNR"), "TLA")
= -1int indexOf(Object[], Object)