or, preferably use the Ruby methods .ljust and .rjust instead of the sprintf format style.