Built-in functions: Array

@implode <glue>, <array>

Joins array elements into a string, separated by the specified glue.

“,” @join [ a, b, c ] // result: “a,b,c”

@find <array>, <value>

Returns the index of all matching value in the array.

[a,b,c,b,d,b] @find b // return [1,3,5]

@contains <array>, <key>

Returns true if the array contains the specified key.

[a=>1,b=>2,c=>true,b,d,b] @find a // return true

@merge <array1>, <array2>

Merges two arrays. Keys will be resetted.

[4=>a,t=>b] @merge [3,4] // result: [0=>a, 1=>b, 2=>3, 3=>4]