Neetend it up a bit...
proc string_pad {orig {num 1} {char " "} {side front} } {
# pad string on either side with a number of characters
set pad [string repeat $char $num]
switch $side {
beginning - front {return $pad$orig}
back - end {return $orig$pad}
default {return...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.