Use char.toDigit where possible.