TStringsSortCompare procedure type
Specifies a comparison function type for string values in a TStrings instance.
Declaration
TStringsSortCompare = function(const Item1: string; const Item2: string)
: IntegerArguments
Item1 | First string value for the comparison. |
Item2 | Second string value for the comparison. |
Function result
Integer with the relative sort order for the compared values.
Description
TStringsSortCompare is an Integer function type used to compare string values to determine the relative sort order. The return value indicates the relative sort order for the compared items, and normally contains a value like the one returned from CompareText. For example:
- <0
- Item1 has a value that comes before Item2.
- 0
- Item1 and Item2 have the same value.
- >0
- Item1 has a value that comes after Item2.
The address for a TStringsSortCompare type is passed as an argument to the MergeSort routine.
Added in LazUtils version 4.0. Replaces the TStringsSortCompare type in the
lclproc.pas unit (
LCL).
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
