fn hex_digits(n: usize) -> usize
Returns the number of hexadecimal digits in the given number.
This is the same as format!("{n:x}").len().
format!("{n:x}").len()