Boost logo

Boost :

From: Samuel Krempp (krempp_at_[hidden])
Date: 2001-06-29 10:42:44


I updated the files, as format2 now reaches "version 1.0"
It is earned because it now has complete support of the desired printf
features ;-)
That is, I added the '+', and ' ' flags.
As well as an extra flag, '=' to indicate 'centered adjustment'.

Also format now behaves correctly when a manipulator puts the stream in
internal adjustment (fill characters goes between sign/basefield and rest
of the number)

So it is now possible to do
cout << format("[%=6s] [%+6s] [%+6s] [% 6s] [%+6s] [%s]\n") % 123
              * internal * setfill('W') % 234
              * internal * setfill('X') % -345
              * setfill('Y') % 456
              * setfill('Z') % -10
              % "foo"
              % "invisible extra argument" << "bar.\n";
which prints :
[ 123 ] [+WW234] [-XX345] [YY 456] [ZZZ-10] [foo]
bar.

-- 
Sam

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk