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中使用flash控件

Delphi 文件/流的加密解密单元 unit_compress.pas

Delphi建立文件的快捷方式

Delphi 中判断windows系统是否是64位系统

Delphi中的处理事件 application.processmessages

Delphi 用firedac获取 sql server错误文本信息

Delphi xe android/ios 手势介绍

Delphi bintohex和hextobin

Delphi 修改ie首页代码

Delphi中判断某个文件是否已经打开

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



打赏

取消

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

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

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

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

评论

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