array_contains
import { array_contains } from "std/array"
pub fun array_contains(array, value)
Checks if a value is in the array.
You can check the original tests for code examples:
- array_contains_empty_num_array.ab
- array_contains_empty_text_array.ab
- array_contains_exact_match.ab
- array_contains_partial_match_with_expanded_element.ab
- array_contains_prefix_match.ab
- array_contains_text_array.ab
array_extract_at
import { array_extract_at } from "std/array"
pub fun array_extract_at(ref array, index)
Removes an element at the index from the array, and returns it; if the
index is negative or beyond the end, the return value is undefined, but
the array will be unchanged.
You can check the original tests for code examples:
array_find
import { array_find } from "std/array"
pub fun array_find(array, value): Num
Returns index of the first value found in the specified array.
If the value is not found, the function returns -1.
You can check the original tests for code examples:
array_find_all
import { array_find_all } from "std/array"
pub fun array_find_all(array, value): [Num]
Searches for a value in an array and returns an array with the index of the various items.
You can check the original tests for code examples:
array_first
import { array_first } from "std/array"
pub fun array_first(array)
Returns the first element in the array; if the array is empty, the return
value is undefined.
You can check the original tests for code examples:
array_last
import { array_last } from "std/array"
pub fun array_last(array)
Returns the last element in the array; if the array is empty, the return
value is undefined.
You can check the original tests for code examples:
array_pop
import { array_pop } from "std/array"
pub fun array_pop(ref array)
Removes the last element from the array, and returns it; if the array
is empty, the return value is undefined, but the array will be unchanged.
You can check the original tests for code examples:
array_remove_at
import { array_remove_at } from "std/array"
pub fun array_remove_at(ref array: [], index: Num): Null
Removes an element at the index from the array; if the index is negative
or beyond the end, the return value is undefined, but the array will be
unchanged.
You can check the original tests for code examples:
array_shift
import { array_shift } from "std/array"
pub fun array_shift(ref array)
Removes the first element from the array, and returns it; if the array
is empty, the return value is undefined, but the array will be unchanged.
You can check the original tests for code examples: