Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
titleAvailability

This routine is available since SIL Engineā„¢ 2.5.15 / 2.6.

Syntax

...

Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

arrayDiff(arrayName1, arrayName2)

Package

array

Alias

Pkg Usage

diff(arrayName1, arrayName2)

Description

Excerpt
hiddentrue
Difference between two arrays. Returns the elements from the first array that do not exist in the second array.

Difference between two arrays. Returns the elements from the first array that do not exist in the second array.

Parameters

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

arrayName1

Array

Yes

First array.

arrayName2

Array

Yes

Second array.

Return Type

arrayArray

...

Examples

Example 1

Code Block
string[] array1 = {"a", "b", "c"};
string[] array2 = {"c", "d"};
return arrayDiff(array1, array2); 

The result will be an array containing elements "a" and "b".

...

Code Block
string[] developers= usersInGroups({"jira -developers"});
string[] administrators = usersInGroups({"jira-administrators"});
return arrayDiff (developers, administrators );

The result is an array that contains only developers that are not also administrators.

Note

If the array types are incompatible, the routine returns error.

See also

Filter by label (Content by label)
showLabelsfalse
max10025
showSpacefalse
cqllabel = "array_routines"routine" and space = currentSpace ( )
labelsarray_routines