@Override
    public int offsetByCodePoints(char[] buf, int start, int count, int index, int offset) {
      final int result = index + offset;
      if (result < 0 || result > count) {
        throw new IndexOutOfBoundsException();
      }
      return result;
    }
Return the index within <code>buf[start:start+count]</code> which is by <code>offset</code>
 code points from <code>index</code>.
linguistics/src/main/java/com/yahoo/language/simple/kstem/CharacterUtils.java