Sign in Join
FPDoc Onlineexperiment

TStringList.Find function

Member of TStringListpublicIn unit Classes

Locates the index for a given string in sorted lists.

Declaration

pascal
function Find(const S: string; out Index: Integer): Boolean; virtual

Description

Find returns True if the string S is present in the list. Upon exit, the Index parameter will contain the position of the string in the list. If the string is not found, the function will return False and Index will contain the position where the string will be inserted if it is added to the list.

  1. Use this method only on sorted lists. For unsorted lists, use IndexOf instead.
  2. Find uses a binary search method to locate the string

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