Re: centering display

new topic     » goto parent     » topic index » view thread      » older message » newer message
petelomax said...

On a slightly more serious note,

printf(1,">%6s<\n",{"four"}) -- produces ">  four<" 
printf(1,">%-6s<\n",{"four"}) -- produces ">four  <" 

Does anyone any have any suggestion/preference for a format string that would produce "> four <"?
(Obviously, there isn't one, but if I were to implement it what would feel right as the third alternative to "%6s" and "%-6s"? "%|6s"? "%=6s"?)

I'd recommend "%^6s" or "%+6s".

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu