- array_init
- array_of
- array_slice
- array_clone
- array_at
- array_append
- array_split
- array_flat
- array_sub
- array_reverse
- array_find
- array_count
- array_exists
- array_expand
- array_length
- array_height
- array_insert
- array_string
- array_sort
- array_replace
- array_swap_item
- array_is_1d
- array_filter
- array_2d_of
params: real (natural), real (natural)
retruns: array with height
* length
items
params: real (natural)
returns: array with length
items
note: alias for array_create(length)
returns: empty array
note: alias for array_create(0)
params: value...
returns: creates an array from arguments
params: array (1D), real (natural), real (natural)
retruns: portion of array
. from
(inclusive), to
(exclusive)
params: array
returns: deep copy of array
, both 1D and 2D arrays
params: array, real (natural)
returns: element in array
at index
(array[subindex, index]
)
params: array, real (natural), real (natural)
returns: element in array
at height, index
(array[height, index]
)
params: array, value
results: appends value
to array
params: array, real (natural), value
results: appends value
to array
at height
params: array (1D), value
returns: 2D array, where each sub array was split by value
params: array
returns: 1D array from 2D array "flattened". array_flat([[1,2,3], [4,5,6]]) == [1,2,3,4,5,6];
param: array, real (natural)
retruns: 1D array from 2D array at position height
params: array (1D)
results: array
with items in reverse order
params: array (1D), real (natural), [real (natural)]
returns: nth position where value is found in 1D array. if not found, returns -1
params: array, value
returns: count of how many of value exists in array
params: array, value
returns: count of how many of value exists in array
params: array (1D)
results: array
becomes all elements of nested arrays
params: array, [real (natural)]
retruns: length of array
, at height height
params: array
retruns: height of array
note: alias of array_height_2d(variable)
params: array, real (natural), value
results: array
with value
inserted at array[index]
, pushing back all items one step
params: array, real (natural), real (natural), value
results: array
with value
inserted at array[height, index]
, pushing back all items one step
params: string
retruns: array with each all characters as items
params: array
results: array
sorted ascendingly. if sorting string: sorted alphabetically
note: all items in array
must be same type
params: array, real (natural), value
results: array[index]
replaced by value
params: array, real (natural), real (natural), value
results: array[height, index]
replaced by value
params: array, real (natural), real (natural)
results: modifies array
by switching items at index1
and index2
params: array, real (natural), real (natural), real (natural)
results: modifies array
at height
by switching items at index1
and index2
params: value
retruns: true if array
is array and has height of 1.
params: array (1D), script (script(val), returns bool)
results: retruns array of items which validate to true when run with script
(script(array[n])
).
params: array (1D)...
results: makes 2d array of arrays.
params: ds_list, real (natural), real (natural)
results: swaps two elements, index_1
and index_2
, in a ds_list
params: value...
results: shorthand for show_debug_message
params: real (boolean), [string]
results: if comparison
is false, show message
and exit
results: nothing. noop is shorthand for "no operation"
params: value
retruns: type of argument, as string
params: real (bool), value, value
returns: if comparison
is true, true_value
, else false_value
params: real, real, real
returns: true if number is withing range min/max (inclusive: min <= number <= max)
params: real, real, real
returns: true if number is withing range min/max (exclusive: min < number < max)
params: real
returns: true if number
is integer (no decimals)
params: real
returns: true if number is natural number (integer and greater or equal to 0)
params: value...
returns: converts all arguments to string
params: array, [string]
returns: string with items in array
joined by joiner
params: string, string
returns: array of strings (string_split("one,2,five", ",") == ["one", "2", "five"]
)
note: automatically converts parameters to strings. string_split(123456, 4) == ["123", "56"]
params: string, real (natural), real (natural)
retruns: portion of string
. from
(inclusive), to
(exclusive).
params: string, real (natural), real (natural)
returns: string from index from
to from + length
. string_substring("hello world!", 6, 3) == "wor")
.
note: alias for string_copy(...)
.
params: string, string, [real (natural)]
returns: position of nth
occurence of find
in source
. if not found, returns 0