Clearly, I can test the length of the string and then use " %-3s" or "%4s" accordingly. Is something simpler possible?'\s\w\s\s' '\s\w\w\s' '\s\w\w\w' '\w\w\w\w'
In reply to conditional string formatting by docdurdee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |