PrevUpHomeNext

Formatting Support

Numeric Base (bin, oct, dec, hex)
Field Width, Fill Character and Adjustment
Leading Whitespace Characters
Floating-Point Precision
Floating-Point Notation

boost::cnv::charconv cnv;

BOOST_TEST( "11111110" == convert< string>(254, cnv(arg::base = cnv::base::bin)).value());
BOOST_TEST(      "254" == convert< string>(254, cnv(arg::base = cnv::base::dec)).value());
BOOST_TEST(       "fe" == convert< string>(254, cnv(arg::base = cnv::base::hex)).value());
BOOST_TEST(      "376" == convert< string>(254, cnv(arg::base = cnv::base::oct)).value());


PrevUpHomeNext