public static int codePointBefore(CharSequence sequence, int index)
public static int codePointBefore(char[] chars, int index)
  public static int codePointBefore(CharSequence sequence, int index)  {    int len = sequence.length();    if (index < 1 || index > len)      throw new IndexOutOfBoundsException();    --index;    char low = sequence.charAt(index);    if (! isLowSurrogate(low) || --index < 0)      return low;    char high = sequence.charAt(index);    if (! isHighSurrogate(high))      return low;    return toCodePoint(high, low);  }