[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/krecipes/src
From: Jason Kivlighn <confederacy2 () excite ! com>
Date: 2004-05-10 2:14:11
Message-ID: 20040510021411.B322622AE () office ! kde ! org
[Download RAW message or body]
CVS commit by jkivlighn:
-Correct the function to "beautify" a string returned by KLocale::formatNumber(). In \
particular it now works with a decimal symbol that contains special regex characters.
M +1 -1 mixednumber.cpp 1.13
--- kdenonbeta/krecipes/src/mixednumber.cpp #1.12:1.13
@@ -19,5 +19,5 @@ QString beautify(const QString &num)
{
QString copy(num);
- copy.remove(QRegExp(QString("0+$|%10+$").arg(KGlobal::locale()->decimalSymbol())));
+ copy.remove(QRegExp(QString("(%1){0,1}0+$").arg(QRegExp::escape(KGlobal::locale()->decimalSymbol()))));
return copy;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic