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

TStrings.Reduce

Get a reduced value from the string list.

Declaration

Source position: classesh.inc line 1041

public function TStrings.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

TStrings.Filter

  

Return a filtered list.

TStrings.Map

  

Call a map routine for each string in the list.

TStrings.Foreach

  

Call a callback for each string in the list.

TStringsReduceMethod

  

Reduce algorithm for TStrings.Reduce.

TStrings.Reverse

  

Reverse the order of the strings in the list.


Documentation generated on: Nov 22 2024