int rangeEnd ( int start , int limitp , int val ) { int c ; int limit = Math . min ( highStart , limitp ) ; for ( c = start + 1 ; c < limit ; c ++ ) { if ( get ( c ) != val ) { break ; } } if ( c >= highStart ) { c = limitp ; } return c - 1 ; }
Find the last character in a contiguous range of characters with the same Trie2 value as the input character .