Zitat:
Delphi-Quellcode:
function TStringList.IndexOf(const S: string): Integer;
begin
if not Sorted then Result := inherited IndexOf(S) else
if not Find(S, Result) then Result := -1;
end;
Wenn deine Liste also Sortiert ist, ergibt es das.
Delphi-Quellcode:
function TStringList.IndexOf(const S: string): Integer;
begin
if not Find(S, Result) then
Result := -1;
end;