Which function is used to remove whitespace from the beginning and end of a string?

Explanation:
trim() removes extra whitespace from both ends of a string.