int nextIndexOf ( char c ) { // doesn't handle scanning for surrogates bufferUp ( ) ; for ( int i = bufPos ; i < bufLength ; i ++ ) { if ( c == charBuf [ i ] ) return i - bufPos ; } return - 1 ; }
Returns the number of characters between the current position and the next instance of the input char