-
Notifications
You must be signed in to change notification settings - Fork 51
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
SetHex or SetString equivalent #108
Comments
Well, there's always
But perhaps you want the ability to do I don't really se any problem with changing Edit, should be fine |
This change adds various string-conversion methods, mainly from decimal. It also aligns some setters, into the following: Public "convenience" constructors FromBig(*big.Int) FromHex(string) FromBase10(string) Instance setters: (z *Int) SetFromBase10(string) (possibly) (z *Int) SetFromBig(*big.Int) (z *Int) SetBytes([]byte) (z *Int) SetString(string, int) Co-authored-by: a <[email protected]> Co-authored-by: Tjudice <[email protected]> Co-authored-by: Martin Holst Swende <[email protected]>
Hey,
it would be nice to have a math/big.Int SetString equivalent so that we can re-use Int objects without releasing to GC. Maybe just expose (z *Int) fromHex(hex string)?
Thanks
The text was updated successfully, but these errors were encountered: