Delphi TStringList 排序 CustomSort


本文整理自网络,侵删。

 

function Compare(List: TStringList; Index1, Index2: Integer): Integer;
var
  S1, S2: string;
begin
  S1 := List[Index1].Substring(0,11);
  S2 := List[Index2].Substring(0, 11);
  Result := CompareStr(S1, S2);
end;

//排序
var
sl: TStringList;
sl.CustomSort(LogLineCompare);

相关阅读 >>

Delphi synedit的安装和基本使用

Delphi xe webbroker 开发,解决 response 返回中文乱码问题

Delphi idhttp post json 上传 php 接收

Delphi 使用fastscript调试脚本

Delphi真正实现延时暂停功能

Delphi 递归实现从m 个集合中 任取一个元素 生成组合

Delphi用idhttp提交自定义cookie

Delphi 打开网址链接

Delphi中webbrowser自动登录路由器网页

Delphi tstringlist自定义排序

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



打赏

取消

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

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

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

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

评论

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