question: public String cropKeepFinalCharacter ( String string , char finalChar ) { String cropped = crop ( string ) ; if ( ( null == string ) || string . equals ( cropped ) ) { return string ; } if ( cropped . length ( ) == 0 ) { return cropped ; } return cropped + finalChar ; }
target:  Crops the given string and adds the given final character to the string's end. If the string is shorter than the specified string length the given string is not altered.