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].toLowertoLowerAscii
assert c in digits[0 .. < base]
result = result * base + digits.find c
 
Anonymous user