======pad====== Pad a [[PTPScript:Types:String|String]] with another [[PTPScript:Types:String|String]], to a certain length. \\ **Syntax** * ''[[PTPScript:Types:String|String]] pad( [[PTPScript:Types:String|String]] subject, [[PTPScript:Types:Number|Number]] length [, [[PTPScript:Types:String|String]] padding [, [[PTPScript:Types:Number|Number]] type ] ] )'' \\ **Parameters** * [[PTPScript:Types:String|String]] ''subject'' - The String to pad. * [[PTPScript:Types:Number|Number]] ''length'' - The length to pad the String to. * [[PTPScript:Types:String|String]] ''padding'' - The String to use as padding (defaults to spaces). * [[PTPScript:Types:Number|Number]] ''type'' - Which side(s) to pad. * ''0'' - Pad the left-hand side of ''subject''. * ''1'' (default) - Pad the right-hand side of ''subject''. * ''2'' - Pad both sides of ''subject''. \\ **Result** * [[PTPScript:Types:String|String]] - The padded String. Returns ''subject'' padded on the left, right, or both sides, to the specified length.