Check for increasing sequence
for ( j = i + 1 ; j < s . length ( ) ; j ++ ) { if ( s . charAt ( j ) > s . charAt ( j - 1 ) ) continue ; if ( s . charAt ( j ) <= s . charAt ( j - 1 ) ) break ; } i = j ;