Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement MustFromHex and MustFromDecimal #131

Merged
merged 1 commit into from
Mar 22, 2023
Merged

implement MustFromHex and MustFromDecimal #131

merged 1 commit into from
Mar 22, 2023

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.

1 participant