question: private int tailingNonNewline ( String str , int off , int len ) { for ( int cnt = 0 ; cnt < len ; cnt ++ ) { final int pos = off + ( len - 1 ) - cnt ; if ( str . charAt ( pos ) == UNIX_NEWLINE ) { return cnt ; } if ( str . charAt ( pos ) == CARRIAGE_RETURN ) { return cnt ; } } return len ; }
target:  Count the tailing non-newline characters.