Go to: Synopsis. Return value. MEL examples.
string[] stringArrayRemoveExact(string[] $itemsToRemove, string[] $list)
string[] : Original list with all occurrences of the string items removed. If none of the string items are in the string array then the returned string array is identical to the argument string array. |
Variable Name | Variable Type | Description |
---|---|---|
$itemsToRemove | string[] | A list of string values to remove from the string array. |
$list | string[] | The array to be acted upon. |
string $list[] = { "a", "b", "a", "a", "c" }; string $itemsToRemove[] = { "a", "c", "a" }; string $diff[] = stringArrayRemoveExact($itemsToRemove, $list); // Result : { b, a } //