Remove whitespace from a String.
Syntax
Parameters
subject
- The String to trim.type
- Which side(s) to trim.0
- Trim the left-hand side of subject
.1
- Trim the right-hand side of subject
.2
(default) - Trim both sides of subject
.charlist
- The characters to remove (defaults to whitespace characters - space, tab, new line, carriage return, vertical tab, and null).
Result
Returns subject
trimmed on the left, right, or both sides.