如何从Delphi组件TStringList中移除重复的条目?

更新于
2026-10-04 22:31:44
0阅读来源:SEO资讯
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计137个文字,预计阅读时间需要1分钟。

删除Delphi组件TStringList中的重复项目 + 2019年02月27日 15:41:15 ozhy111 阅读数 81procedure RemoveDuplicates(const stringList: TStringList);var buffer: TStringList; cnt: Integer;begin // (此处省略代码)end

blog.csdn.net/ozhy111/article/details/87975663

删除delphi组件TStringlist中的重复项目

2019年02月27日 15:41:15ozhy111阅读数 81

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;

www.3sogou.com/read.php?tid=5013034&ds=1

标签:重复

本文共计137个文字,预计阅读时间需要1分钟。

删除Delphi组件TStringList中的重复项目 + 2019年02月27日 15:41:15 ozhy111 阅读数 81procedure RemoveDuplicates(const stringList: TStringList);var buffer: TStringList; cnt: Integer;begin // (此处省略代码)end

blog.csdn.net/ozhy111/article/details/87975663

删除delphi组件TStringlist中的重复项目

2019年02月27日 15:41:15ozhy111阅读数 81

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;

www.3sogou.com/read.php?tid=5013034&ds=1

标签:重复