======trim====== Remove whitespace from a [[PTPScript:Types:String|String]]. \\ **Syntax** * ''[[PTPScript:Types:String|String]] trim( [[PTPScript:Types:String|String]] subject [, [[PTPScript:Types:Number|Number]] type [, [[PTPScript:Types:String|String]] charlist ] ] )'' \\ **Parameters** * [[PTPScript:Types:String|String]] ''subject'' - The String to trim. * [[PTPScript:Types:Number|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''. * [[PTPScript:Types:String|String]] ''charlist'' - The characters to remove (defaults to whitespace characters - space, tab, new line, carriage return, vertical tab, and null). \\ **Result** * [[PTPScript:Types:String|String]] - The trimmed String. Returns ''subject'' trimmed on the left, right, or both sides.