You can use this bigint implementation as reference:
[https://github.com/status-im/nim-stint/blob/4fe901d33b9f5b3ad5f51a587bf6bbb6eb20121b/stint/io.nim#L135-L154](https://github.com/status-im/nim-stint/blob/4fe901d33b9f5b3ad5f51a587bf6bbb6eb20121b/stint/io.nim#L135-L154)
Great, thanks.
The message is misleading. "result" is the one at line 325 in system.nim, i.e.
the HSlice which is returned by the proc.
When instanciating the slice (".."), the fields "a" and "b" of "result" (a
slice) should be initialized with 0. But "b" is of type "range[8..10] and
cannot be initialized wit
Thanks for the pointer. I adapted the example like this:
const DIGITS = "0123456789"
proc parseInt(s : string, radix: range[8..10]) : uint64 =
var str = s
result = 0
for i in 0 .. str.high:
let c = str[i]
assert c in DIGITS[0 ..< radi
Not in the standard library. Example implementation here
[https://rosettacode.org/wiki/Non-decimal_radices/Convert#Nim](https://rosettacode.org/wiki/Non-decimal_radices/Convert#Nim)
I see the parseutils module has parseHex, parseOct and parseInt and the dom
module exposes a C function parseInt that converts a C string to a number with
an arbitrary radix, but I don't see a parseInt(s: string, radix: int): int in
the documentation. Have I missed it, or is this functionality i