Funkcja Find nie działa prawidłowo

0
procedure TForm1.Button1Click(Sender: TObject);
var
i:integer;
ZrodloChrome: TStringList;
begin

ZrodloChrome:=TStringList.Create();
try
ZrodloChrome.LoadFromFile(PobierzAdres('Local Settings')+'\Dane aplikacji\Google\Chrome\User Data\Default\'+'Preferences');
ZrodloChrome.Find('         "crowdflower.com": -0.5778829455375671',i);
Showmessage(inttostr(i)+'='+ZrodloChrome.Strings[i]);
finally
ZrodloChrome.Free;
end;
end;

program znajduje mi linijke 403, która ma inną wartość

chce wiedziec dlaczego tak sie dzieje ze nie znajduje prawidłowej linijki

1

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

Delphi syntax:

function Find(const S: string; var Index: Integer): Boolean; virtual;

C++ syntax:

virtual bool __fastcall Find(const AnsiString S, int &Index);

Description

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.

0

To locate a particular string in the list, call the IndexOf method.

1 użytkowników online, w tym zalogowanych: 0, gości: 1