question: public static int findBeforeNewLineChar ( CharSequence s , int start ) { for ( int i = start - 1 ; i > 0 ; i -- ) { if ( s . charAt ( i ) == '\n' ) { return i ; } } return - 1 ; }
target:  find '\n' before "start" position