public static final boolean hasScript(int c, int sc) {
        int scriptX=UCharacterProperty.INSTANCE.getAdditional(c, 0)&UCharacterProperty.SCRIPT_X_MASK;
        if(scriptX<UCharacterProperty.SCRIPT_X_WITH_COMMON) {
            return sc==scriptX;
        }

        char[] scriptExtensions=UCharacterProperty.INSTANCE.m_scriptExtensions_;
        int scx=scriptX&UCharacterProperty.SCRIPT_MASK_;  // index into scriptExtensions
        if(scriptX>=UCharacterProperty.SCRIPT_X_WITH_OTHER) {
            scx=scriptExtensions[scx+1];
        }
        if(sc>0x7fff) {
            // Guard against bogus input that would
            // make us go past the Script_Extensions terminator.
            return false;
        }
        while(sc>scriptExtensions[scx]) {
            ++scx;
        }
        return sc==(scriptExtensions[scx]&0x7fff);
    }
public static final boolean hasScript ( int c , int sc ) { int scriptX = UCharacterProperty . INSTANCE . getAdditional ( c , 0 ) & UCharacterProperty . SCRIPT_X_MASK ; if ( scriptX < UCharacterProperty . SCRIPT_X_WITH_COMMON ) { return sc == scriptX ; } char [ ] scriptExtensions = UCharacterProperty . INSTANCE . m_scriptExtensions_ ; int scx = scriptX & UCharacterProperty . SCRIPT_MASK_ ; if ( scriptX >= UCharacterProperty . SCRIPT_X_WITH_OTHER ) { scx = scriptExtensions [ scx + 1 ] ; } if ( sc > 0x7fff ) { return false ; } while ( sc > scriptExtensions [ scx ] ) { ++ scx ; } return sc == ( scriptExtensions [ scx ] & 0x7fff ) ; }
Do the Script_Extensions of code point c contain script sc?
If c does not have explicit Script_Extensions, then this tests whether
c has the Script property value sc.

<p>Some characters are commonly used in multiple scripts.
For more information, see UAX #24: http://www.unicode.org/reports/tr24/.

@param c code point
@param sc script code
@return true if sc is in Script_Extensions(c)