question: public static int lastIndexOfWhitespace ( String src , int startIndex , int endIndex ) { int total = src . length ( ) - 1 ; if ( total < 0 ) { return - 1 ; } if ( startIndex >= total ) { startIndex = total ; } if ( endIndex < 0 ) { endIndex = 0 ; } for ( int i = startIndex ; i >= endIndex ; i -- ) { if ( Character . isWhitespace ( src . charAt ( i ) ) ) { return i ; } } return - 1 ; }
target:  Returns last index of a whitespace.