Removes leading and trailing whitespace or specified characters from string.
string
The string to trim.
The characters to trim.
Optional
Returns the trimmed string.
5.6.0
[[trimEnd]],[[trimStart]]
trim(' abc ')// => 'abc'trim('-_-abc-_-', '_-')// => 'abc' Copy
trim(' abc ')// => 'abc'trim('-_-abc-_-', '_-')// => 'abc'
Removes leading and trailing whitespace or specified characters from
string
.