Stuff
public text v1 · immutablefunction Repetidos(Lista: TStrings): Integer;
var
i, cnt: integer;
S: TStringList;
begin
i:= 0;
Result := 0;
S := TStringList.Create;
S.Assign(Lista);
while S.Count > i do
if S.IndexOf(S.Strings[i])<>i then
begin
S.Delete( i );
inc(Result);
end
else
inc( i );
S.Free;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if opendialog1.execute then
listbox1.items.loadfromfile(opendialog1.filename);
ShowMessage(IntToStr(Repetidos(Listbox1.items)));
//Displays
end;