是的TStringList CustomSort方法是posssible使用的名称从名称/值对的名称/值对
目前我使用的是的TStringList排序在每个POS一个值来使用customSort在TStringList中。我现在需要用这个值添加额外的数据,并为此我现在使用的TStringList作为名称/值
我现在CompareSort是:
function StrCmpLogicalW(sz1, sz2: PWideChar): Integer; stdcall;
external 'shlwapi.dll' name 'StrCmpLogicalW';
function MyCompare(List: TStringList; Index1, Index2: Integer): Integer;
begin
Result := StrCmpLogicalW(PWideChar(List[Index1]), PWideChar(List[Index2]));
end;
Usage:
StringList.CustomSort(MyCompare);
有没有修改这个,以便它,并据此排序方式在名称值对的名称?
或者,有没有另一种方法?