I admire your perseverance, though there comes a time when it's time to fall back on plan B. Were it me, my Plan B would involve sprintf with a helper function to center strings.
It's not the Zen way, but it gets the job done.
-- Garrison Keillor
Unfortunately, if you look at the longer format (the one I'm really trying to use) it's a little more complex than sprintf() could easily handle. I'm doing more than just centering after all.