The strtrim_end function removes all trailing whitespace
characters from the string s and returns the result. The
optional second parameter specifies the set of whitespace
characters. If the argument is not present, then the set defaults
to " \t\r\n".