diff --git a/src/core/pistring.cpp b/src/core/pistring.cpp index d248a92e..ef2edcf1 100755 --- a/src/core/pistring.cpp +++ b/src/core/pistring.cpp @@ -817,6 +817,17 @@ PIString PIString::toLowerCase() const { } +PIString PIString::toNativeDecimalPoints() const { +#ifdef HAS_LOCALE + PIString s(*this); + if (currentLocale == 0) return s; + return s.replaceAll(".", currentLocale->decimal_point).replaceAll(",", currentLocale->decimal_point); +#else + return PIString(*this).replaceAll(",", "."); +#endif +} + + char PIString::toChar() const { PIString s(toNativeDecimalPoints()); char v; diff --git a/src/core/pistring.h b/src/core/pistring.h index 0b4518e7..a0215dc5 100755 --- a/src/core/pistring.h +++ b/src/core/pistring.h @@ -469,14 +469,7 @@ public: //! \brief Convert each symbol in copyed string to lower case and return it PIString toLowerCase() const; - - PIString toNativeDecimalPoints() const { -#ifdef HAS_LOCALE - PIString s(*this); if (currentLocale == 0) return s; return s.replaceAll(".", currentLocale->decimal_point).replaceAll(",", currentLocale->decimal_point); -#else - return PIString(*this).replaceAll(",", "."); -#endif - } + PIString toNativeDecimalPoints() const; //! \brief Search substring "str" from symbol at index "start" and return first occur position