Removes whitespace from both ends of a string. Whitespace in this context is all the whitespace characters (space, tab, no-break space, etc.) and all the line terminator characters (LF, CR, etc.).
- The source string from which to remove leading and trailing whitespace.
- A string stripped of whitespace from both its beginning and end. If neither the beginning or end of source string has any whitespace, the string is simply returned, with no exception being thrown.
@debug string.trim(' Hey, you guys! ');
// "Hey, you guys!"