The chop() function is only an alias of rtrim, which strips whitespace (or other characters) from the end of a string.
For further information about how chop() can be used, see rtrim().