
6 Sep
2004
6 Sep
'04
8:02 p.m.
Stefan Slapeta wrote:
though this wouldn't be the usual approach as in other languages. I would go this way and add an optional parameter in boost::lexial_cast which would result in a syntax similar to .NET and Java:
string s = lexical_cast<std::string>(1231.23, "#,#.00");
Fine idea. Would it work the other way, too, eg. double d = lexical_cast<double>("1,231.23", "#,#.00"); ? B.