core/char: Speed up to_digit()
for radix <= 10
#55932
Merged
to_digit()
for radix <= 10
#55932