code: public static char idx( String str, int index ) {
          int i = calculateIndex( str.length(), index );
  
          char c = str.charAt( i );
          return c;
      }
docs: Gets character at index
  @param str string
  @param index index
  @return char at