for numeric (left-padding only):
message STRING(1,"9999") = "0001"
message STRING(1,"ZZZZ") = " 1"
message STRING(-1,"-ZZZZ") = "- 1"
message STRING(-1,"->>>>") = " -1"
for character (right-padding with space only):
STRING("a","x(4)") = "a "
of course, you can write your own PadRight PadLeft functions, which can be "smarter"