question: public static boolean isSurrogatePair ( String text , int idx ) { return ! ( idx < 0 || idx > text . length ( ) - 2 ) && isSurrogateHigh ( text . charAt ( idx ) ) && isSurrogateLow ( text . charAt ( idx + 1 ) ) ; }
target:  Checks if two subsequent characters in a String are are the higher and the lower character in a surrogate pair (and therefore eligible for conversion to a UTF 32 character).