Go to: Synopsis. Return value. MEL examples.

Synopsis

string[] stringArrayRemove(string[] $item, 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 all occurrences of the given string items will be removed from the string array, not just the first occurrence.

Return value

None

Arguments

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

MEL examples

  string $list[]  = { "a", "b", "c", "d", "e", "f", "g" };
  string $items[] = { "a", "c", "e", "g" };
  string $diff[] = stringArrayRemove($items, $list);
  // Result : { b, d, f } //