DecimalFormat.ApplyLocalizedPattern(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Apply the given pattern to this Format object.
[Android.Runtime.Register("applyLocalizedPattern", "(Ljava/lang/String;)V", "GetApplyLocalizedPattern_Ljava_lang_String_Handler")]
public virtual void ApplyLocalizedPattern (string? pattern);
[<Android.Runtime.Register("applyLocalizedPattern", "(Ljava/lang/String;)V", "GetApplyLocalizedPattern_Ljava_lang_String_Handler")>]
abstract member ApplyLocalizedPattern : string -> unit
override this.ApplyLocalizedPattern : string -> unit
Parameters
- pattern
- String
a new pattern
- Attributes
Exceptions
if the pattern cannot be parsed.
Remarks
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 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 parentheses.
In negative patterns, the minimum and maximum counts are ignored; these are presumed to be set in the positive pattern.
Java documentation for java.text.DecimalFormat.applyLocalizedPattern(java.lang.String)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.