Logo Search packages:      
Sourcecode: icu version File versions

void DecimalFormat::applyLocalizedPattern ( const UnicodeString pattern,
UParseError parseError,
UErrorCode status 
) [virtual]

Apply the given pattern to this Format object. The pattern is assumed to be in a localized notation. A pattern is a short-hand specification for the various formatting properties. These properties can also be changed individually through the various setter methods.

There is no limit to integer digits are set by this routine, since that is the typical end-user desire; use setMaximumInteger if you want to set a real value. For negative numbers, use a second pattern, separated by a semicolon

 .      Example "#,#00.0#" -> 1,234.56

This means a minimum of 2 integer digits, 1 fraction digit, and a maximum of 2 fraction digits.

Example: "#,#00.0#;(#,#00.0#)" for negatives in parantheses.

In negative patterns, the minimum and maximum counts are ignored; these are presumed to be set in the positive pattern.

patternThe localized pattern to be applied.
parseErrorStruct to recieve information on position of error if an error is encountered
statusOutput param set to success/failure code on exit. If the pattern is invalid, this will be set to a failure result. ICU 2.0

Definition at line 3874 of file decimfmt.cpp.

References applyPattern(), and TRUE.

Referenced by NumberFormatRegressionTest::Test4212072(), IntlTestDecimalFormatAPI::testAPI(), and unum_applyPattern().

    applyPattern(pattern, TRUE,parseError,status);

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index