List.ReplaceValue
語法
List.ReplaceValue(list as list, oldValue as any, newValue as any, replacer as function) as list
關於
搜尋值清單 list
中的值 oldValue
,並將出現的每一次以取代值 newValue
取代。
範例 1
將清單 {"a", "B", "a", "a"} 中的所有 "a" 值以 "A" 取代。
使用方式
List.ReplaceValue({"a", "B", "a", "a"}, "a", "A", Replacer.ReplaceText)
輸出
{"A", "B", "A", "A"}