github.com/Tri-stone/burrow@v0.25.0/tests/jobs_fixtures/app35-library_handling/consuming-contract.sol (about) 1 pragma solidity >=0.0.0; 2 3 import "./single-lib.sol"; 4 5 contract C { 6 using Search for uint[]; 7 uint[] data; 8 9 function append(uint value) public { 10 data.push(value); 11 } 12 13 function replace(uint _old, uint _new) public { 14 // This performs the library function call 15 uint index = data.indexOf(_old); 16 if (index == uint(-1)) 17 data.push(_new); 18 else 19 data[index] = _new; 20 } 21 }