git-svn-id: svn://db.shs.com.ru/pip@373 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-04-17 12:19:19 +00:00
parent 82f6edf345
commit ca9551eb33
2 changed files with 12 additions and 8 deletions

View File

@@ -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;

View File

@@ -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