Class: Array
@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.
- Type:
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.
- Type:
@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.
- Type:
@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.
- Type:
value
- Type:
primitive
- The value to insert.
- Type:
@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.
- Type:
@Array.clear
Scope: public
Clears the array.
Usage: @Array.clear