trim(str)
Removes whitespace characters from the beginning and end of a String. In addition to standard whitespace characters such as space, carriage return, and tab, this function also removes the Unicode “nbsp” character.
Type: function
Parameter(s):
- str {String | Array}:
A string or an array of strings to be trimmed
Returns:
-
{String | Array}:
Returns the input in a trimmed way