Nota
Capaian ke halaman ini memerlukan kebenaran. Anda boleh cuba mendaftar masuk atau menukar direktori.
Capaian ke halaman ini memerlukan kebenaran. Anda boleh cuba menukar direktori.
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}