Duplicates
Posted: Tue Nov 02, 2010 9:03 pm
Dimitris, how to remove duplicates in delphi?
after many hours i finaly have found some solution but it works with "Sorted=True" only.
on discogs are a lot dublicates labels.
for example:
Cat1, Cat2, Cat3
Label1, Label1, Label2
i wish remove duplicates but not sort it. any hint?
Code: Select all
lbl := TStringList.Create;
lbl.Duplicates := dupIgnore;
lbl.Sorted := True;
i := 0;
repeat
sqrNum := GetPart (sCat, i, ';');
if (sqrNum <> '') then lbl.Add(trim(sqrNum));
i := i + 1;
until sqrNum = '';
sCat := lbl.CommaText;
lbl.Free;
on discogs are a lot dublicates labels.
for example:
Cat1, Cat2, Cat3
Label1, Label1, Label2
i wish remove duplicates but not sort it. any hint?