Delphi从Memo去重数据


本文整理自网络,侵删。

 


var
i: Integer;
s: string;
begin
for I := 0 to mmo1.Lines.Count - 1 do
begin
s := mmo1.Lines[i];
mmo1.Lines.Delete(i);
while mmo1.Lines.IndexOf(s) > -1 do
mmo1.Lines.Delete(mmo1.Lines.IndexOf(s));
mmo1.Lines.Insert(i, s);
end;
end;

结果:
在这里插入图片描述

相关阅读 >>

Delphi regularexpressions 正则表达式如何忽略大小写

Delphi 每年、月、周、日的开始与结束的时间startofayear … startoftheyear … endofayear … endoftheyear

Delphi idhttp添加头信息

Delphi tgifimage:timage显示gif动画

Delphi实现获取密码框中的密码

Delphi中如何提高listview删除item的速度

Delphi cxgrid:动态设计统计功能

Delphi中内嵌汇编

Delphi xe8在firemonkey tlistbox中显示图像

Delphi base64编码/解码及zlib压缩/解压

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...