Remove whitespace from a String.



  • 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).


  • String - The trimmed String.

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

ptpscript/functions/trim.txt · Last modified: 2007/01/24 10:15
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki