private int find ( UTF8String str , int start ) { assert ( str . numBytes > 0 ) ; while ( start <= numBytes - str . numBytes ) { if ( ByteArrayMethods . arrayEquals ( base , offset + start , str . base , str . offset , str . numBytes ) ) { return start ; } start += 1 ; } return - 1 ; }
Find the str from left to right .