private int lastIndexOfSupplementary(int ch,int fromIndex){
  if (Character.isValidCodePoint(ch)) {
    final char[] value=this.value;
    char hi=Character.highSurrogate(ch);
    char lo=Character.lowSurrogate(ch);
    int i=Math.min(fromIndex,value.length - 2);
    for (; i >= 0; i--) {
      if (value[i] == hi && value[i + 1] == lo) {
        return i;
      }
    }
  }
  return -1;
}

private int lastIndexOfSupplementary ( int ch , int fromIndex ) { if ( Character . isValidCodePoint ( ch ) ) { final char [ ] value = this . value ; char hi = Character . highSurrogate ( ch ) ; char lo = Character . lowSurrogate ( ch ) ; int i = Math . min ( fromIndex , value . length - 2 ) ; for ( ; i >= 0 ; i -- ) { if ( value [ i ] == hi && value [ i + 1 ] == lo ) { return i ; } } } return - 1 ; }
handles ( rare ) calls of lastindexof with a supplementary character .
