Module : lang.array

Version : 1.1.0

Module Overview

This module provides lang library list operations defined by the language specification 2020R1.

Functions

enumerate
I

Returns a new array consisting of index and member pairs.

filter

Selects the members from an array for which a function returns true.

forEach

Applies a function to each member of an array.

fromBase16
I

Returns the byte array that a string represents in Base16.

fromBase64
I

Returns the byte array that a string represents in Base64.

indexOf
I

Returns the index of first member of arr that is equal to val if there is one.

iterator
I

Returns an iterator over an array.

lastIndexOf
I

Returns the index of last member of arr that is equal to val if there is one.

length
I

Returns the number of members of an array.

map

Applies a function to each member of an array and returns an array of the results.

pop
I

Removes and returns the last member of an array.

push
I

Adds values to the end of an array.

reduce

Combines the members of an array using a combining function.

remove
I

Removes a member of an array.

removeAll
I

Removes all members of an array.

reverse
I

Reverses the order of the members of an array.

setLength
I

Changes the length of an array.

shift
I

Removes and returns first member of an array.

slice
I

Returns a subarray starting from startIndex (inclusive) to endIndex (exclusive).

sort
I

Sorts an array.

toBase16
I

Returns the string that is the Base16 representation of an array of bytes.

toBase64
I

Returns the string that is the Base64 representation of an array of bytes.

toStream

Returns a stream from the given array.

unshift
I

Adds values to the start of an array.

Constants

ASCENDING
DESCENDING

Types

SortDirection