19 Apr
2015
19 Apr
'15
1:23 p.m.
There is karma::hex formatter and I need somehow to add zero padding to get “0a” instead of just “a”. in addition it would be lovely to have some king of control over hex letter case. It sounds like a policies for real or Boolean formatters but I didn’t find one for hex. Is it possible to achieve the above without policy?
Padding can be achieved by using the right_align[] directive: http://www.boost.org/doc/libs/1_58_0/libs/spirit/doc/html/spirit/karma/refer.... You can control the hex-letter case using the upper[] and lower[] directives: http://www.boost.org/doc/libs/1_58_0/libs/spirit/doc/html/spirit/karma/refer.... HTH Regards Hartmut --------------- http://boost-spirit.com http://stellar.cct.lsu.edu