C4 Engine
C4 Engine API Documentation


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

int32 FindArrayElementIndex(const type& element) const;

element The value of the element to find.
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.