Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Syntax
List.ReplaceMatchingItems(
list as list,
replacements as list,
optional equationCriteria as any
) as list
About
Applies the given replacements to the list. The replacements parameter defines the list of replacement pairs to apply. Each replacement pair is a list of two values, the old value and new value. An optional equation criteria value, equationCriteria, can be specified to control equality testing.
Example
Replace the numbers 5 and 1 in the list with their negative equivalents.
Usage
List.ReplaceMatchingItems({1, 2, 3, 4, 5}, {{5, -5}, {1, -1}})
Output
{-1, 2, 3, 4, -5}