ArrayUtils.sol

Library for address array operations

indexOf

function indexOf(address[] _array, address _element) internal pure returns (uint32, bool)

Finds the index of the first occurrence of the given element.

Parameters

NameTypeDescription
_arrayaddress[]The input array to search
_elementaddressThe value to find

Return Values

NameTypeDescription
[0]uint32Returns (index and isIn) for the first occurrence starting from index 0
[1]bool