ArrayExclude()

Summary

Excludes elements from an array.

Changes

Added to Version 6.0/2012.

arr = ArrayExclude(array input, array excl)

Argument Contents
input The input array
excl An array with elements to exclude from input

Returns

An array with the elements in excl excluded.

Notes

  • You can exclude missing elements by having null as an element in excl.

  • ArrayExclude() is case-sensitive for strings.

Examples

// Remove 3 and null from the elements
input = {1,null,3,null,5}
excl = {3,null}
ShowArray(ArrayExclude(input, excl)) // shows resulting array {1,5}

See Also

Function Summary
ArrayIntersect() Creates an array that contains the elements of the array a that are also in array b
ArrayUnion() Returns a new array containing all unique elements from arrays a and b.
ExcludeArrayElements() Removes elements from an array
InsertArrayElements() Inserts elements into an array