From ca9551eb33bfa05829d1ae028dec404ccb64185c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=8B=D1=87=D0=BA=D0=BE=D0=B2=20=D0=90=D0=BD=D0=B4?= =?UTF-8?q?=D1=80=D0=B5=D0=B9?= Date: Mon, 17 Apr 2017 12:19:19 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/pip@373 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- src/core/pistring.cpp | 11 +++++++++++ src/core/pistring.h | 9 +-------- 2 files changed, 12 insertions(+), 8 deletions(-) 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