N
N
nalimite2017-02-13 16:54:18
Delphi
nalimite, 2017-02-13 16:54:18

Delphi! Removing duplicates from one file in another! How to implement?

How to quickly remove duplicate lines from one file in another?
There is a code:

procedure DubleClear.Execute;
var
  i,j:integer;
  d:boolean;
begin

  For i:=AdditionalBase.Count-1 downto 0 do
   begin
      d:=false;
      For j:=0 to MainBase.Count-1 do
         If AdditionalBase[i]=MainBase[j] then
         begin
            d:=true;
            Break;
         end;
      If d then
         MainBase.Delete(i);
   end;
   Rez := 2;
   Synchronize(Sync);
end;

Where MainBase - This is the stringlist where you need to look for duplicates and remove them.
AdditionalBase - This is the Base where a bunch of words to compare MainBase with.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2017-02-13
@xmoonlight

stackoverflow.com/questions/33616774/how-to-make-a...

0
0xD34F, 2017-10-05
@bqio

trytitle=(.+)\s

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question