infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
TCL TPS need to pad to the right of a string
Jerry Tilsley
All,
I have figured out how to get the tcl string format command to pad some spaces to the left of a variable, but cannot seem to be able to get it to work with padding to the right.
I need to take the following:
"PAYROLL"
and turn it into:
"PAYROLL "
Thanks!
Find more posts tagged with
Clovertech
Comments
Vince Angulo
I believe a hyphen in the format string to left justify:
[format "%-20s" $variable]
...if the padded result is 20 positions long.
Keith McLeod
Not fancy, but works:
set y "${x}[string repeat 0 [expr 14-[string length $x]]"
Jerry Tilsley
Thanks everyone!