private int indexOfSupplementary(int ch,int fromIndex){
  if (Character.isValidCodePoint(ch)) {
    final char[] value=this.value;
    final char hi=Character.highSurrogate(ch);
    final char lo=Character.lowSurrogate(ch);
    final int max=value.length - 1;
    for (int i=fromIndex; i < max; i++) {
      if (value[i] == hi && value[i + 1] == lo) {
        return i;
      }
    }
  }
  return -1;
}

private int indexOfSupplementary ( int ch , int fromIndex ) { if ( Character . isValidCodePoint ( ch ) ) { final char [ ] value = this . value ; final char hi = Character . highSurrogate ( ch ) ; final char lo = Character . lowSurrogate ( ch ) ; final int max = value . length - 1 ; for ( int i = fromIndex ; i < max ; i ++ ) { if ( value [ i ] == hi && value [ i + 1 ] == lo ) { return i ; } } } return - 1 ; }
handles ( rare ) calls of indexof with a supplementary character .
