Boost logo

Boost :

From: Boris (boriss_at_[hidden])
Date: 2006-06-29 07:40:21

I'm using boost::lexical_cast to convert strings to double. However I just
run into a string with a percent sign where boost::lexical_cast throws
boost::bad_lexical_cast. As far as I can see there is no way to configure
boost::lexical_cast to convert eg. "60%" to 0.6. I also checked out
boost::numeric_cast but from what I read I think it doesn't help either.

Is there anything in Boost which I can use to convert a more descriptive
string like "60%" to a double?


Boost list run by bdawes at, gregod at, cpdaniel at, john at