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



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

TStrings.IndexOf

Find a string in the list and return its position.

Declaration

Source position: classesh.inc line 499

public function TStrings.IndexOf(

  const S: String

):Integer; virtual;

Description

IndexOf searches the list for S. The search is case-insensitive. If a matching entry is found, its position is returned. if no matching string is found, -1 is returned.

Remark:
  1. Only the first occurrence of the string is returned.
  2. The returned position is zero-based, i.e. 0 indicates the first string in the list.

See also

TStrings.IndexOfObject

  

Finds an object in the list and returns its index.

TStrings.IndexOfName

  

Finds the index of a name in the name-value pairs.

TStrings.Strings

  

Indexed access to the strings in the list.

Notes

 No notes exist for this page yet. 





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