Array Functions
Before going in note that any time VARNAME or FUNCNAME is written, it means a variable or function in the form Collection@Variable or a literal.
Also note that most functions here also work with tuples, except min, max and sort
min
Syntax:
max
Syntax:
rfind
Syntax:
Finds the first string in the array VARNAME2 that matches the regex pattern VARNAME3 and assigns it to VARNAME1. If no match is found, VARNAME1 is assigned an empty string. VARNAME2 must be an array of strings, and VARNAME3 must be a string representing a regex pattern.
rfindindex
Syntax:
Finds the index of the first string in the array VARNAME2 that matches the regex pattern VARNAME3 and assigns it to VARNAME1. If no match is found, -1.0 is returned. VARNAME2 must be an array of strings, and VARNAME3 must be a string representing a regex pattern.
find
Syntax:
Finds the index of the first string with the content VARNAME3 in the array VARNAME2 and assigns the result to VARNAME1. If no match is found an error is thrown. VARNAME2 must be an array of any type, and VARNAME3 must match that type.
get
Syntax:
Gets the value at index VARNAME3 in the array VARNAME2 and assigns it to VARNAME1. If VARNAME3 is out of bounds, an error is thrown. VARNAME2 must be an array of any type, and VARNAME3 must be a number representing a valid index in VARNAME2.
length
Syntax:
Returns the length of the array VARNAME2 and assigns it to VARNAME1. VARNAME2 must be an array of any type.
append
Syntax:
Clones the array VARNAME2 but with the value VARNAME3 added to the end and assigns it to VARNAME1. VARNAME2 must be an array of any type, and VARNAME3 must match that type.
sort
Syntax:
Sorts array VARNAME2 and sets VARNAME1 to the result
slice
Syntax:
Slices VARNAME2, giving a subarray of the elements from VARNAME3 to VARNAME4 and assigning the result to VARNAME1
count
Syntax:
Counts the number of occurences in VARNAME2 of element VARNAME3, assinging the result to VARNAME1
reverse
Syntax:
Reverses the array VARNAME2 and sets VARNAME1 to the result
set
Syntax:
Sets the value of VARNAME2 at index VARNAME3 to the value VARNAME4
insert
Syntax:
Inserts the value VARNAME4 into VARNAME2 at index VARNAME3
range
Syntax:
Creates an array with numbers VARNAME2 to VARNAME3 with a step size of VARNAME4