Go to: Synopsis. Return value. MEL examples.

Synopsis

string[] stringArrayRemoveDuplicates(string[] $list)

Remove all duplicate items from a string array. There will be only one occurrence of each string item in the returned string array. The argument string array is not modified.

Return value

string[] : New string array with all unique values.

Arguments

Variable Name Variable Type Description
$liststring[]An array of strings.

MEL examples

  string $list[] = { "d", "b", "c", "c", "a", "a", "b" };
  string $shorterList[] = stringArrayRemoveDuplicates($list);
  // Result : { d, b, c, a } //