Suppose I want to convert a base-36 encoded string to a BigInt
, I can do this:
BigInt(parseInt(x,36))
But what if my string exceeds what can safely fit in a Number? e.g.
parseInt('zzzzzzzzzzzzz',36)
Then I start losing precision.
Are there any methods for parsing directly into a BigInt
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…