matchElements

Checks if all elements present in an array are also present in another array

Index, and the number of times the element is present in each array doesn't matter

More...
bool
matchElements
(
T
)
(,)

Return Value

Type: bool

true if all elements present in toMatch are also present in elements

Detailed Description

Arguments: toMatch is the array to perform the check on elements is the array containing the elements that will be compared against

Examples

assert("Hello".matchElements("aeloH") == true);
assert("abcd".matchElements("cda") == false);

Meta