Functions Index :: A :: ArrayReduce
Module:
array :: transforms
Definition:
ArrayReduce(string array, string flags)
Description:
Removes elements from array, wherever the corresponding flags array element has a value equal to zero. Returns the modified array.
Notes and conditions on arguments relations:
1] Both array and flags arrays must have the same length, else the function will throw an error.
Examples:
a1 = ArrayCreate(2.5, 3.12, 0.34, 2.15, 4, 5.1)
flags = ArrayCreate(1, -1, 0, 2, 0, 0)
a3 = a1.ArrayReduce(flags)
# a3 == "2.5, 3.12, 2.15"