ArrayIsSubsetOf (open)
Checks if the 'subset' array is a subset of the 'fullset' array
Syntax
LOADLIB "wh::util/algorithms.whlib";
BOOLEAN FUNCTION ArrayIsSubsetOf(VARIANT subset, VARIANT fullset)
Parameters
VARIANT subset
The array to check
VARIANT fullset
The array with all elements
Return value
BOOLEAN
TRUE if the match array is a subset of the input array
Description
Returns FALSE if any element in the 'subset' set is missing from the 'fullset' set
Examples
STRING ARRAY alpha := [ "baz", "bar" ];
STRING ARRAY bravo := [ "foo", "bar", "baz", "test", "alpha", "beta", "charlie" ];
// Returns TRUE
BOOLEAN test1 := ArrayIsSubsetOf(alpha, bravo);
// Returns FALSE
BOOLEAN test2 := ArrayIsSubsetOf(bravo, alpha);