Unit 'Classes' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

TStringList.CustomSort

Sort the stringlist using a custom sort algorithm.

Declaration

Source position: classesh.inc line 1154

public procedure TStringList.CustomSort(

  CompareFn: TStringListSortCompare

); virtual;

procedure TStringList.CustomSort(

  CompareFn: TStringListSortCompare;

  SortingAlgorithm: PSortingAlgorithm

); virtual;

Description

CustomSort sorts the stringlist with a custom comparison function. The function should compare 2 elements in the list, and return a negative number if the first item is before the second. It should return 0 if the elements are equal, and a positive result indicates that the second elements should be before the first.

See also

TStringList.Sorted

  

Determines whether the list is sorted or not.

TStringList.Sort

  

Sorts the strings in the list.


Documentation generated on: Dec 25 2024