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.