code: public static int digit(char c, int radix) {
          for (int i = 0; i < MAX_RADIX && i < radix; i++) {
              if (digits[i] == c) {
                  return i;
              }
          }
          return -1;
      }
docs: Returns the numeric value of the character {@code c} in the specified
  radix.
  
  @param c
  @param radix
  @return
  @see #MAX_RADIX