question: private String trimText ( String text ) { if ( text . length ( ) > BUBBLE_TEXT_LENGTH ) { text = text . substring ( 0 , BUBBLE_TEXT_LENGTH ) ; int n = text . lastIndexOf ( ' ' ) ; n = Math . max ( n , text . lastIndexOf ( '-' ) ) ; n = Math . max ( n , text . lastIndexOf ( '.' ) ) ; n = Math . max ( n , text . lastIndexOf ( ',' ) ) ; if ( n > 0 ) { text = text . substring ( 0 , n ) ; } text += " ..." ; } return text ; }
target:  Trim text for a speech bubble.