Hi there everyone,
I have some Delphi code for sorting a Listview
type
TCustomSortStyle = (cssAlphaNum, cssNumeric, cssDateTime);
...........
case LvSortStyle of
cssAlphaNum : Result := lstrcmp(PChar(s1), PChar(s2));
cssNumeric : begin
r1 := IsValidNumber(s1, i1);
r2 := IsValidNumber(s2, i2);
Result := ord(r1 or r2);
if Result <> 0 then
Result := CompareNumeric(i2, i1);
end;
cssDateTime : begin
r1 := IsValidDate(s1, d1);
r2 := IsValidDate(s2, d2);
Result := ord(r1 or r2);
if Result <> 0 then
Result := CompareDates(d1, d2);
end;
end;
The code fails to compile because of the line
Result := lstrcmp(PChar(s1), PChar(s2));
The problem is the 'lstrcmp' command. What is its equivalent in Lazarus/FreePascal?
Thank you for your kind assistance.
JD