Skip to content

Conversation

@holiman
Copy link
Owner

@holiman holiman commented Mar 22, 2023

The PR #128 added MustFromBig, this PR adds two similar helpers: MustFromHex and MustFromDecimal.

// MustFromHex is a convenience-constructor to create an Int from
// a hexadecimal string.
// Returns a new Int and panics if any error occurred.
func MustFromHex(hex string) *Int 

// MustFromDecimal is a convenience-constructor to create an Int from a
// decimal (base 10) string.
// Returns a new Int and panics if any error occurred.
func MustFromDecimal(decimal string) *Int 

@holiman holiman changed the title implement MustFromHex, MustFromDecimal implement MustFromHex and MustFromDecimal Mar 22, 2023
@holiman holiman merged commit 29b48c8 into master Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants