Is is posssible to use customSort on a TStringList using the Name from the Name/Value pairs
I was currently using a TStringList to sort one value in each pos. I now need to add additional data with this value and therefor I am now using the TStringList as Name/Values
My current CompareSort is:
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);
is there a way to modify this so that it sorts based on the Name of the name value pairs?
Or, is there another way?