help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



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

TStringList.Find

Locates the index for a given string in sorted lists.

Declaration

Source position: classesh.inc line 578

public function TStringList.Find(

  const S: String;

  var 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.

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

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505