Anonymous user
Non-decimal radices/Convert: Difference between revisions
Updated to work with Nim 1.4: replaced ".. <" with "..<", replaced "toLower" with "toLowerAscii".
m (→Python: number to string: Enabled syntax highlighting) |
(Updated to work with Nim 1.4: replaced ".. <" with "..<", replaced "toLower" with "toLowerAscii".) |
||
Line 2,202:
for i in first .. str.high:
let c = str[i].
assert c in digits[0 ..
result = result * base + digits.find c
|