Skip to main content

trim

Trim whitespace (or optionally specified characters) from the beginning and end of a string.


Examples

Trim spaces from a string:

"  hello  ".trim