C4 Engine
C4 Engine API Documentation

Array::FindArrayElementIndex

Defined in:  TSArray.h
Finds a specific element in an array.
Prototype

int32 FindArrayElementIndex(const type& element) const;

Parameters
element The value of the element to find.
Description
The FindArrayElementIndex function searches an array for the first element matching the value passed into the element parameter based on the == operator. If a match is found, its index is returned. If no match is found, then the return value is −1. The running time of this function is O(n), where n is the number of elements in the array.