Replace is_digit with '0' <= c && c <= '9'