Skip to end of banner
Go to start of banner

Array routines

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Looking for the documentation on the newest versions of SIL Engine and the Simple Issue Language for Jira 8 for Server/Data Center? Click here !

 This section contains routines that enable users to handle arrays.

Routines summary

  • arrayAddElementIf elem is an element of the array type, returns a new array that includes the specified element at the end.
  • arrayAddElementIfNotExistIf elem is an element of the array type, returns a new array that includes the specified element at the end. The element is added only if it is not already in the array.
  • arrayDeleteElementIf elem is an element of the array type, returns a new array without the specified element.
  • arrayDeleteElementAtIf index is less than the array size, returns a new array without the element at the specified index.
  • arrayDiffDifference between two arrays. Returns the elements from the first array that do not exist in the second array.
  • arrayElementExistsReturns "true" if the element exists in the array and "false" otherwise.
  • arrayFindFinds an element inside the collection and returns its index. If the element is not found, it returns -1.
  • arrayFindBinaryBinary search on sorted array. If the element is not found, returns -1.
  • arrayGetElementReturns the element at the specified index.
  • arrayIntersectIntersect between two arrays.
  • arrayKeysReturns the keys of the array, if array is using the new syntax in version 2.5.
  • arrayKeySortSorts the elements from an array by their keys. Works with keyed arrays only.
  • arraysConcatAdds the elements of the second array to the first one.
  • arraySetElementIf elem is an element of the array type, returns a new array with the specified element on position index1. If index1 is greater than the array size, it will add empty elements on the missing positions.
  • arraySizeReturns the size of the given array.
  • arraySortSorts the elements from an array.
  • arrayStructSortSorts the elements from an array by their specified field. Works only with arrays that contain structures.
  • arrayToSetConverts an array to a set of unique elements.
  • arrayUnionUnion between two arrays.
  • excludeSubarrayReturns an array excluding the array that starts at index 'start' and ends at index 'end'.
  • subarrayReturns an array starting with index 'start' and ending at index 'end'.

Notes

  • Arrays are created by using this construct: {<value1>, <value2>, ..., <value3>}
  • Multi-dimensional arrays are supported.

See also

  • No labels