Bytes
Concurrent Bytes Array
The Bytes contract
is a concurrent array specialized for storing bytes data. It inherits from the Base contract to utilize container functionalities for bytes storage.
Constructor
Bytes()
Constructor for the Bytes contract.
Public Functions
push
Add a bytes data element to the concurrent array.
Parameters:
elem
: The bytes data element to add to the array.
pop
Remove and return the last bytes data element from the concurrent array.
Returns:
bytes memory
: The last bytes data element from the array.
get
Retrieve the bytes data element at the given index from the concurrent array.
Parameters:
idx
: The index of the bytes data element to retrieve.
Returns:
bytes memory
: The bytes data element stored at the given index.
set
Set the bytes data element at the given index in the concurrent array.
Parameters:
idx
: The index where the bytes data element should be stored.elem
: The bytes data element to be stored at the specified index.
Last updated