Use standard String.trim() for removing trailing whitespace at the end of comments