Logo Search packages:      
Sourcecode: icu version File versions

DecimalFormat::DecimalFormat ( const UnicodeString pattern,
DecimalFormatSymbols symbolsToAdopt,
UParseError parseError,
UErrorCode status 

Create a DecimalFormat from the given pattern and symbols. Use this constructor when you need to completely customize the behavior of the format.

To obtain standard formats for a given locale, use the factory methods on NumberFormat such as createInstance or createCurrencyInstance. If you need only minor adjustments to a standard format, you can modify the format returned by a NumberFormat factory method.

patterna non-localized pattern string
symbolsToAdoptthe set of symbols to be used. The caller should not delete this object after making this call.
parseErrorOutput param to receive errors occured during parsing
statusOutput param set to success/failure code. If the pattern is invalid this will be set to a failure code. ICU 2.0

Definition at line 278 of file decimfmt.cpp.

References construct(), DecimalFormat(), init(), NULL, and U_ILLEGAL_ARGUMENT_ERROR.

    if (symbolsToAdopt == NULL)
        status = U_ILLEGAL_ARGUMENT_ERROR;
    construct(status,parseErr, &pattern, symbolsToAdopt);

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index