1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 10× 10× 10× 10× | pragma solidity ^0.4.4; library Lib1{ function findAddress(address a, address[] storage arry) returns (int){ for (uint i = 0 ; i < arry.length ; i++){ if(arry[i] == a){return int(i);} } return -1; } function removeAddress(uint i, address[] storage arry){ uint lengthMinusOne = arry.length - 1; arry[i] = arry[lengthMinusOne]; delete arry[lengthMinusOne]; arry.length = lengthMinusOne; } } |