String

Concurrent String Array

The String contract is a concurrent array specialized for storing string data. It inherits from the Base contract to utilize container functionalities for string storage.

Constructor

String()

constructor()

Public Functions

push

function push(string memory elem) public virtual

Add a string data element to the concurrent array.

  • Parameters:

    • elem: The string data element to add to the array.

pop

function pop() public virtual returns (string memory)

Remove and return the last string data element from the concurrent array.

  • Returns:

    • string: The last string data element from the array.

get

function get(uint256 idx) public virtual returns (string memory)

Retrieve the string data element at the given index from the concurrent array.

  • Parameters:

    • idx: The index of the string data element to retrieve.

  • Returns:

    • string: The string data element stored at the given index.

set

function set(uint256 idx, string memory elem) public

Set the string data element at the given index in the concurrent array.

  • Parameters:

    • idx: The index where the string data element should be stored.

    • elem: The string data element to be stored at the specified index.

Last updated