RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TWideStringList.Find Method

Locates the index for a string in a sorted list and indicates whether a string with that value already exists in the list.

Pascal
function Find(const S: WideString; var Index: Integer): Boolean; virtual;
C++
virtual __fastcall Boolean Find(const BSTR S, int Index);

Use Find to obtain the index in a sorted list where the string S should be added. If the string S, or a string that differs from S only in case when CaseSensitive is false, already exists in the list, Find returns true. If the list does not contain a string that matches S, Find returns false. The index where S should go is returned in the Index parameter. The value of Index is zero-based, where the first string has the index 0, the second string has the index 1, and so on.

Note: Only use Find with sorted lists. For unsorted lists, use the IndexOf method instead.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!