Go to: Synopsis. Return value. MEL examples.

Synopsis

string[] stringArrayRemoveExact(string[] $itemsToRemove, string[] $list)

Remove the string items in the first string array from the second string array. A new string array with the items removed is returned. The second argument is left unchanged.

Note that, as opposed to 'stringArrayRemove', for each occurrence of an entry in $item, only one entry from $list will be removed.

Return value

None

Arguments

Variable Name Variable Type Description
$itemsToRemovestring[]A list of string values to remove from the string array.
$liststring[]The array to be acted upon.

MEL examples

  string $list[] = { "a", "b", "a", "a", "c" };
  string $itemsToRemove[] = { "a", "c", "a" };
  string $diff[] = stringArrayRemoveExact($itemsToRemove, $list);
  // Result : { b, a } //