Show: Delphi C++
Display Preferences

System.Classes.TStringList.CustomSort

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure CustomSort(Compare: TStringListSortCompare); virtual;

C++

virtual void __fastcall CustomSort(TStringListSortCompare Compare);

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Classes.pas
System.Classes.hpp
System.Classes TStringList

Description

Sorts the strings in the list in a customized order.

Use CustomSort to sort the strings in the list, where the sort order is defined by the Compare parameter.

Supply a value for the Compare function that compares two strings in the string list. The List parameter provides access to the string list, while the Index1 and Index2 parameters identify the strings to be compared.

Do not pass nil (Delphi) or NULL (C++) as the value of the Compare parameter.

Note: You must explicitly call the CustomSort method. Setting the Sorted property only sorts strings using ANSI (Windows) or UTF-8 (Linux) order, as implemented in the Sort method.

See Also

Personal tools
Translations