Removes whitespace characters, including null, or the specified characters from the end of a string.