There's a format
directive to zero-pad digits.
cl-user> (format nil "~12,'0d" 27)
"000000000027"
and there's a similar-ish directive to left-align strings while padding them
cl-user> (format nil "~12@<~d~>" 27)
"27 "
Is there a way to do both? That is:
cl-user> (format nil "~12,something,d" 27)
"270000000000"
The naive "~12,'0@<~d~>"
does not seem to do what I want here.
cl-user> (format nil "~12,'0@<~d~>" 27)
"27 "