trim

Remove whitespace from a String.


Syntax


Parameters

  • String subject - The String to trim.
  • Number 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.
  • String charlist - The characters to remove (defaults to whitespace characters - space, tab, new line, carriage return, vertical tab, and null).


Result

  • String - The trimmed String.

Returns subject trimmed on the left, right, or both sides.