System.WideStrings.TWideStrings.IndexOf
Delphi
function IndexOf(const S: WideString): Integer; virtual;
C++
virtual int __fastcall IndexOf(const System::WideString S);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.WideStrings.pas System.WideStrings.hpp |
System.WideStrings | TWideStrings |
Description
Returns the position of a string in the list.
Call IndexOf to obtain the position of the first occurrence of the string S, or of a string that differs from S only in case. IndexOf returns the 0-based index of the string. Thus, if S matches the first string in the list, IndexOf returns 0, if S is the second string, IndexOf returns 1, and so on. If the string is not in the string list, IndexOf returns -1.
Note: If the string appears in the list more than once, IndexOf returns the position of the first occurrence.