ArrayIsSetEqual (open)

Checks if two arrays are equal, if treated as a set (ignore duplicates and ordering)

Syntax

LOADLIB "wh::util/algorithms.whlib";

BOOLEAN FUNCTION ArrayIsSetEqual(VARIANT match, VARIANT input)

Parameters

VARIANT match

The array to check

VARIANT input

The array to compare against

Return value

BOOLEAN

TRUE if the arrays are equal as a set

Examples

// Returns TRUE
BOOLEAN test1 := ArrayIsSetEqual([1,2], [2,1]);

// Returns TRUE
BOOLEAN test1 := ArrayIsSetEqual([1,2,2], [1,2]);