code: public static int offsetByCodePoints(char[] a, int start, int count,
                                           int index, int codePointOffset) {
          if (count > a.length-start || start < 0 || count < 0
              || index < start || index > start+count) {
              throw new IndexOutOfBoundsException();
          }
          return offsetByCodePointsImpl(a, start, count, index, codePointOffset);
      }
docs: Returns the index within the given {@code char} subarray
  that is offset from the given {@code index} by
  {@code codePointOffset} code points. The
  {@code start} and {@code count} arguments specify a
  subarray of the {@code char} array. Unpaired surrogates
  within the text range given by {@code index} and
  {@code codePointOffset} count as one code point each.
  
  @param a the {@code char} array
  @param start the index of the first {@code char} of the
  subarray
  @param count the length of the subarray in {@code char}s
  @param index the index to be offset
  @param codePointOffset the offset in code points
  @return the index within the subarray
  @exception NullPointerException if {@code a} is null.
  @exception IndexOutOfBoundsException
  if {@code start} or {@code count} is negative,
  or if {@code start + count} is larger than the length of
  the given array,
  or if {@code index} is less than {@code start} or
  larger then {@code start + count},
  or if {@code codePointOffset} is positive and the text range
  starting with {@code index} and ending with {@code start + count - 1}
  has fewer than {@code codePointOffset} code
  points,
  or if {@code codePointOffset} is negative and the text range
  starting with {@code start} and ending with {@code index - 1}
  has fewer than the absolute value of
  {@code codePointOffset} code points.
  @since 1.5