Boost logo

Boost Users :

Subject: [Boost-users] [lexical_cast] is it possible to customize the conversion from double to string?
From: Wu Degang (samuelandjw_at_[hidden])
Date: 2012-08-13 07:56:02


Hi,

The default behavior of lexical_cast<string>(a_double_variable) will
result in a number string that is very long and barely readable. Is it
possible to customize the way lexical_cast<string>(a_double_variable)
can have a similar result as '%.2f' or '%.3e'?

Thank you!

wdg


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net