public int getGroup ( int codepoint ) { int endGroup = m_groupcount_ ; int msb = getCodepointMSB ( codepoint ) ; int result = 0 ; // binary search for the group of names that contains the one for // code // find the group that contains codepoint, or the highest before it while ( result < endGroup - 1 ) { int gindex = ( result + endGroup ) >> 1 ; if ( msb < getGroupMSB ( gindex ) ) { endGroup = gindex ; } else { result = gindex ; } } return result ; }
Gets the group index for the codepoint or the group before it .