TStringList.Find

function Find(S: String; var Index: Integer): Boolean S: string to be found (or string to be found index for) Index: main result of the function, index of Strings[] that S is or would be added Result: TRUE if S has been found, FALSE otherwise

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. Note: this function is supposed to be used with sorted lists. For unsorted list use IndexOf.