docs: private static long parseUnsignedLong(String s, int radix)
      {
          if (s.length() == 0)
          {
              throw new NumberFormatException("empty string");
          }
          if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX)
          {
              throw new NumberFormatException("illegal radix: " + radix);
          }
  
          int max_safe_pos = maxSafeDigits[radix] - 1;
          long value = 0;
          for (int pos = 0; pos < s.length(); pos++)
          {
              int digit = Character.digit(s.charAt(pos), radix);
              if (digit == -1)
              {
                  throw new NumberFormatException(s);
              }
              if (pos > max_safe_pos && overflowInParse(value, digit, radix))
              {
                  throw new NumberFormatException("Too large for unsigned long: " + s);
              }
              value = (value * radix) + digit;
          }
  
          return value;
      }