本文整理自网络,侵删。
procedure RemoveDuplicates(const stringList : TStringList) ; var buffer: TStringList; cnt: Integer; begin stringList.Sort; buffer := TStringList.Create; try buffer.Sorted := True; buffer.Duplicates := dupIgnore; buffer.BeginUpdate; for cnt := 0 to stringList.Count - 1 do buffer.Add(stringList[cnt]) ; buffer.EndUpdate; stringList.Assign(buffer) ; finally FreeandNil(buffer) ; end; end;
相关阅读 >>
Delphi2010安装twordapplication控件
Delphi通过spcomm com口发短信包括pud编码解码
Delphi xe 启动关闭start page 页错误提示
更多相关阅读请进入《Delphi》频道 >>