Go to: Synopsis. Return value. MEL examples.

Synopsis

stringArrayRemove string[] string[]

stringArrayRemove is NOT undoable, NOT queryable, and NOT editable.

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 returned unchanged.

Note that all occurrences of the given string items will be removed from the string array, not just the first occurrence. If none of the string items are in the string array then the returned string array is identical to the argument string array.

The implementation of stringArrayRemove has been replaced with a new version to improve its performance. It is no longer a MEL procedure. It is a built-in MEL function.

Return value

string[]Result string array

MEL examples

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