//SPDX-License-Identifier: UNLICENSED //llydia cross 2021 pragma solidity ^0.8.0; library InfinityMintUtil { function toString( uint256 _i ) internal pure returns (string memory _uintAsString) { if (_i == 0) { return '0'; } uint256 j = _i; uint256 len; while (j != 0) { len++; j /= 10; } bytes memory bstr = new bytes(len); uint256 k = len; while (_i != 0) { k = k - 1; uint8 temp = (48 + uint8(_i - (_i / 10) * 10)); bytes1 b1 = bytes1(temp); bstr[k] = b1; _i /= 10; } return string(bstr); } //checks if two strings (or bytes) are equal function isEqual( bytes memory s1, bytes memory s2 ) internal pure returns (bool) { bytes memory b1 = bytes(s1); bytes memory b2 = bytes(s2); uint256 l1 = b1.length; if (l1 != b2.length) return false; for (uint256 i = 0; i < l1; i++) { //check each byte if (b1[i] != b2[i]) return false; } return true; } }