ad_pad (public)

 ad_pad [ -left ] [ -right ] string length padstring

Defined in packages/acs-tcl/tcl/text-html-procs.tcl

Tcl implementation of the pad string function found in many DBMSs. One of the directional flags -left or -right must be specified and will dictate whether this will be a lpad or a rpad.

Switches:
-left (optional, boolean)
text will be appended left of the original string.
-right (optional, boolean)
text will be appended right of the original string.
Parameters:
string (required)
length (required)
padstring (required)
Returns:
padded string

Testcases:
ad_pad
[ show source ]
Show another procedure: