lexical_util::digit

Function digit_to_char_const

Source
pub const fn digit_to_char_const(digit: u32, radix: u32) -> u8
Expand description

Convert a digit to a character with a radix known at compile time.

This optimizes for cases where radix is <= 10, and uses a decent, match-based fallback algorithm.