@include <Array>

The Array class provides a simple array implementation in Bash++.

Data Members

  • @Array.array
    • Type: primitive
    • Scope: protected

    • The array that stores the elements.

Methods

@Array.size

Scope: public

Echoes the number of elements in the array.

Usage: @Array.size

Parameters

@Array.push

Scope: public

Pushes a value onto the end of the array.

Usage: @Array.push $value

Parameters

  • value
    • Type: primitive
    • The value to push onto the end of the array.

@Array.back

Scope: public

Echoes the last element in the array.

Usage: @Array.back

Parameters

@Array.at

Scope: public

Echoes the element at the specified index.

Usage: @Array.at $index

Parameters

  • index
    • Type: primitive
    • The index of the element to echo.

@Array.insert

Scope: public

Inserts a value at the specified index.

Usage: @Array.insert $index $value

Parameters

  • index
    • Type: primitive
    • The index at which to insert the value.
  • value
    • Type: primitive
    • The value to insert.

@Array.remove

Scope: public

Removes the element at the specified index.

Usage: @Array.remove $index

Parameters

  • index
    • Type: primitive
    • The index of the element to remove.

@Array.clear

Scope: public

Clears the array.

Usage: @Array.clear

Parameters