Logo Search packages:      
Sourcecode: icu version File versions

void DecimalFormat::setFormatWidth ( int32_t  width ) [virtual]

Set the width to which the output of format() is padded. The width is counted in 16-bit code units. This method also controls whether padding is enabled.

Parameters:
widththe width to which to pad the result of format(), or zero to disable padding. A negative width is equivalent to 0.
See also:
getFormatWidth
getPadCharacterString
setPadCharacter
getPadPosition
setPadPosition ICU 2.0

Set the width to which the output of format() is padded. This method also controls whether padding is enabled.

Parameters:
widththe width to which to pad the result of format(), or zero to disable padding. A negative width is equivalent to 0.
See also:
getFormatWidth
getPadCharacter
setPadCharacter
getPadPosition
setPadPosition

Definition at line 2951 of file decimfmt.cpp.

Referenced by NumberFormatTest::TestPatterns2(), and unum_setAttribute().

                                                {
    fFormatWidth = (width > 0) ? width : 0;
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index