|
|
|
@ -114,14 +114,6 @@ QString BitcoinUnits::format(int unit, qint64 n, bool fPlus, SeparatorStyle sepa
@@ -114,14 +114,6 @@ QString BitcoinUnits::format(int unit, qint64 n, bool fPlus, SeparatorStyle sepa
|
|
|
|
|
QString quotient_str = QString::number(quotient); |
|
|
|
|
QString remainder_str = QString::number(remainder).rightJustified(num_decimals, '0'); |
|
|
|
|
|
|
|
|
|
// Right-trim excess zeros after the decimal point
|
|
|
|
|
int nTrim = 0; |
|
|
|
|
for (int i = remainder_str.size()-1; i>=2 && (remainder_str.at(i) == '0'); --i) |
|
|
|
|
++nTrim; |
|
|
|
|
remainder_str.chop(nTrim); |
|
|
|
|
if (fAlign) |
|
|
|
|
remainder_str.append(QString(QChar(FIGURE_SP_CP)).repeated(nTrim)); |
|
|
|
|
|
|
|
|
|
// Use SI-stule separators as these are locale indendent and can't be
|
|
|
|
|
// confused with the decimal marker. Rule is to use a thin space every
|
|
|
|
|
// three digits on *both* sides of the decimal point - but only if there
|
|
|
|
|