[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Classes' (#rtl)

TFPList.IndexOfItem

Search an item in the list

Declaration

Source position: classesh.inc line 252

public function TFPList.IndexOfItem(

  Item: Pointer;

  Direction: TDirection

):Integer;

Description

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.

See also

TFPList.TDirection

  

Search direction for IndexOfItem

TFPList.IndexOf

  

Returns the index of a given pointer.


Documentation generated on: Jun 23 2021