Sign in Join
FPDoc Onlineexperiment

TFPList.IndexOfItem function

Member of TFPListpublicIn unit Classes

Search an item in the list.

Declaration

pascal
function 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

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.