是的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);
有沒有修改這個,以便它,並據此排序方式在名稱值對的名稱?
或者,有沒有另一種方法?