Add toUint, toInt and hexToUint to Strings (#5166)

Co-authored-by: cairo <cairoeth@protonmail.com>
Co-authored-by: Ernesto García <ernestognw@gmail.com>
This commit is contained in:
Hadrien Croubois
2024-10-14 17:13:33 +02:00
committed by GitHub
parent 72c152dc1c
commit bd588959ad
6 changed files with 503 additions and 68 deletions

View File

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---
`Strings`: Add `parseUint`, `parseInt`, `parseHexUint` and `parseAddress` to parse strings into numbers and addresses. Also provide variants of these functions that parse substrings, and `tryXxx` variants that do not revert on invalid input.