Skip to content

TStrings.Filter

Return a filtered list.

Declaration

Source position: classesh.inc line 1126

public 
procedure Filter(aFilter: TStringsFilterMethod; aList: TStrings);

function Filter(aFilter: TStringsFilterMethod) : TStrings;

Description

Filter applies aFilter to each string in the list, and if aFilter returns True, adds the string to the aList list. If the aList argument is not supplied, the result is a TStringList instance that must be freed by the caller.

See also

Name Description
TStringsFilterMethod Callback signature for TStrings.Filter.
TStringList Standard implementation of the TStrings class.
TStrings.Foreach Call a callback for each string in the list.
TStrings.Map Call a map routine for each string in the list.
TStrings.Reduce Get a reduced value from the string list.
TStrings.Reverse Reverse the order of the strings in the list.