Browse files

Merge pull request #379 from gavinandresen/nocommas

Do not use comma as thousands separator
  • Loading branch information...
2 parents 06c903b + 59f9c8e commit 9390431ce49893cbdf23846edb4bdf72b3d4e830 @gavinandresen gavinandresen committed Jul 4, 2011
Showing with 0 additions and 7 deletions.
  1. +0 −7 src/util.cpp
View
7 src/util.cpp
@@ -346,11 +346,6 @@ string FormatMoney(int64 n, bool fPlus)
if (nTrim)
str.erase(str.size()-nTrim, nTrim);
- // Insert thousands-separators:
- size_t point = str.find(".");
- for (int i = (str.size()-point)+3; i < str.size(); i += 4)
- if (isdigit(str[str.size() - i - 1]))
- str.insert(str.size() - i, 1, ',');
if (n < 0)
str.insert((unsigned int)0, 1, '-');
else if (fPlus && n > 0)
@@ -373,8 +368,6 @@ bool ParseMoney(const char* pszIn, int64& nRet)
p++;
for (; *p; p++)
{
- if (*p == ',' && p > pszIn && isdigit(p[-1]) && isdigit(p[1]) && isdigit(p[2]) && isdigit(p[3]) && !isdigit(p[4]))
- continue;
if (*p == '.')
{
p++;

0 comments on commit 9390431

Please sign in to comment.