Sign in Join
FPDoc Onlineexperiment

TStrings.Reduce function

Member of TStringspublicIn unit Classes

Get a reduced value from the string list.

Declaration

pascal
function Reduce(aReduceMethod: TStringsReduceMethod; 
 const startingValue: string): string

Description

Reduce iterates over all strings in the list and calls the aReduceMethod callback with 2 strings: the result of the previous iteration and the current string. The return value will be used in the next iteration, or will result in the end result of the method if the last string was reached.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.