Skip to content

Commit

Permalink
feat: remove uint2str (#225)
Browse files Browse the repository at this point in the history
Unused and doesn't work great according to the audit

Co-authored-by: Nicolas Villanueva <[email protected]>
  • Loading branch information
cpb8010 and MexicanAce authored Dec 19, 2024
1 parent f42d9ff commit 795c857
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/libraries/JsmnSolLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -334,23 +334,6 @@ library JsmnSolLib {
return mint;
}
function uint2str(uint i) internal pure returns (string memory) {
if (i == 0) return "0";
uint j = i;
uint len;
while (j != 0) {
len++;
j /= 10;
}
bytes memory bstr = new bytes(len);
uint k = len - 1;
while (i != 0) {
bstr[k--] = bytes1(uint8(48 + (i % 10)));
i /= 10;
}
return string(bstr);
}
function parseBool(string memory _a) internal pure returns (bool) {
if (strCompare(_a, "true") == 0) {
return true;
Expand Down

0 comments on commit 795c857

Please sign in to comment.