Array routines
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
- arrayAddElement — If elem is an element of the array type, returns a new array that includes the specified element at the end.
- arrayAddElementIfNotExist — If 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.
- arrayDeleteElement — If elem is an element of the array type, returns a new array without the specified element.
- arrayDeleteElementAt — If index is less than the array size, returns a new array without the element at the specified index.
- arrayDiff — Difference between two arrays. Returns the elements from the first array that do not exist in the second array.
- arrayElementExists — Returns "true" if the element exists in the array and "false" otherwise.
- arrayFind — Finds an element inside the collection and returns its index. If the element is not found, it returns -1.
- arrayFindBinary — Binary search on sorted array. If the element is not found, returns -1.
- arrayGetElement — Returns the element at the specified index.
- arrayIntersect — Intersect between two arrays.
- arrayKeys — Returns the keys of the array, if array is using the new syntax in version 2.5.
- arrayKeySort — Sorts the elements from an array by their keys. Works with keyed arrays only.
- arraysConcat — Adds the elements of the second array to the first one.
- arraySetElement — If 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.
- arraySize — Returns the size of the given array.
- arraySort — Sorts the elements from an array.
- arrayStructSort — Sorts the elements from an array by their specified field. Works only with arrays that contain structures.
- arrayToSet — Converts an array to a set of unique elements.
- arrayUnion — Union between two arrays.
- excludeSubarray — Returns an array excluding the array that starts at index 'start' and ends at index 'end'.
- subarray — Returns 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.