fn is_canonically_formatted_integer(digits: &str) -> bool
Expand description

We wish to be stricter than from_str_radix in order to ensure a canonical format, and in particular:

  • Not allow + at the start
  • Not allow leading 0s
  • Not allow an empty string