ℹ️ArrayUtils
API:
API
Function Description
function merge(
uint256[] memory arrA,
uint256[] memory arrB
) public pure returns(
uint256[] memory
)Merge two arrays (arrA, arrB) after de-duplication, return the concatenation of the two arrays without duplicates.
function filter(
uint256[] memory arrA,
uint256[] memory arrC,
uint256 lenC
) public pure returns(
uint256[] memory,
uint256
)Filter out the elements that do not exist in the conditional array (arrC) from the source array (arrA), and store them into the conditional array (arrC), and return with the conditional array (arrC) and its length.
function resize(
uint256[] memory arrA,
uint256 len
) public pure returns(
uint256[] memory
)Intercept the first len elements of the source array (arrA) to form a new array and return.
function refine(
uint256[] memory arrA
) pure returns(
uint256[] memory
) Returns the source array (arrA) after de-duplication.
function combine(
uint256[] memory arrA,
uint256[] memory arrB
) public pure returns (
uint256[] memory
)Simply combine two source arrays(arrA, arrB) and return.
function minus(
uint256[] memory arrA,
uint256[] memory arrB
) public pure returns (
uint256[] memory
)Return the difference set of the array (arrA) minus the array (arrB).
function fullyCoveredBy(
uint256[] memory arrA,
uint256[] memory arrB
) public pure returns (
bool
)Detects whether the elements of array(arrB) are fully covered by array(arrA).