System.Classes.TStringList.Sort

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Sort; virtual;

C++

virtual void __fastcall Sort();

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 ascending order.

Call Sort to sort the strings in a list that has the Sorted property set to false. String lists with the Sorted property set to true are automatically sorted.

Note: Sort uses AnsiCompareStr to sort the strings when CaseSensitive is true and AnsiCompareText when CaseSensitive is false. To provide your own comparison operator instead, use the CustomSort method.

See Also

Code Examples