SetString calls (big.Int).SetString.
(s string, base int)
| 886 | |
| 887 | // SetString calls (big.Int).SetString. |
| 888 | func (z *BigInt) SetString(s string, base int) (*BigInt, bool) { |
| 889 | if i, err := strconv.ParseInt(s, base, 64); err == nil { |
| 890 | z.SetInt64(i) |
| 891 | return z, true |
| 892 | } |
| 893 | var tmp1 big.Int //gcassert:noescape |
| 894 | zi := z.inner(&tmp1) |
| 895 | if _, ok := zi.SetString(s, base); !ok { |
| 896 | return nil, false |
| 897 | } |
| 898 | z.updateInner(zi) |
| 899 | return z, true |
| 900 | } |
| 901 | |
| 902 | // SetUint64 calls (big.Int).SetUint64. |
| 903 | func (z *BigInt) SetUint64(x uint64) *BigInt { |