Sign in Join
FPDoc Onlineexperiment

TStringList.IndexOf function

Member of TStringListpublicIn unit Classes

Overrides the IndexOf property.

Declaration

pascal
function IndexOf(const S: string): Integer; override

Description

IndexOf overrides the ancestor method indexOf. It tries to optimize the search by executing a binary search if the list is sorted. The function returns the position of S if it is found in the list, or -1 if the string is not found in the list.

See also

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