changed all std::atof() to uStr2Float() to fix locale comma float conversion problem

This commit is contained in:
Mathieu Labbe
2015-02-04 21:20:17 -05:00
parent f8b625c7c7
commit 3d1eccbce1
15 changed files with 75 additions and 38 deletions
@@ -117,6 +117,22 @@ std::string UTILITE_EXP uNumber2Str(float number);
*/
std::string UTILITE_EXP uNumber2Str(double number);
/**
* Convert a string to a float independent of the locale (comma/dot).
* @param the string
* @return the number
*/
float UTILITE_EXP uStr2Float(const std::string & str);
/**
* Convert a string to a double independent of the locale (comma/dot).
* @param the string
* @return the number
*/
double UTILITE_EXP uStr2Double(const std::string & str);
/**
* Convert a bool to a string.
* The format used is "true" and "false".