Search an item in the list.
Source position: classesh.inc line 539
public function TFPList.IndexOfItem( |
Item: Pointer; |
Direction: TDirection |
):Integer; |
IndexOfItem has the same function as the IndexOf function: it searches for Item in the list, and returns the index of the first found matching pointer. If none is found, -1 is returned.
In difference with the IndexOf function, it accepts a parameter Direction indicating the search direction: from the beginning of the list till the end of the list, or from the end of the list till the beginning. The IndexOf function starts at the beginning of the list. The search direction is only important if the item can appear multiple times in the list.
|
Search direction for IndexOfItem. |
|
|
Returns the index of a given pointer. |