Logo Search packages:      
Sourcecode: icu version File versions  Download package

void NumberFormat::setMaximumIntegerDigits ( int32_t  newValue  )  [virtual, inherited]

Sets the maximum number of digits allowed in the integer portion of a number. maximumIntegerDigits must be >= minimumIntegerDigits. If the new value for maximumIntegerDigits is less than the current value of minimumIntegerDigits, then minimumIntegerDigits will also be set to the new value.

Parameters:
newValue the new value for the maximum number of digits allowed in the integer portion of a number.
See also:
getMaximumIntegerDigits ICU 2.0

Reimplemented in DecimalFormat.

Definition at line 931 of file numfmt.cpp.

Referenced by DecimalFormat::setMaximumIntegerDigits(), SimpleDateFormat::subFormat(), NumberFormatRegressionTest::Test4162198(), NumberFormatTest::TestAPI(), IntlTestNumberFormatAPI::testAPI(), and SimpleDateFormat::zeroPaddingNumber().

{
    fMaxIntegerDigits = uprv_max(0, uprv_min(newValue, gMaxIntegerDigits));
    if(fMinIntegerDigits > fMaxIntegerDigits)
        fMinIntegerDigits = fMaxIntegerDigits;
}


Generated by  Doxygen 1.6.0   Back to index