Share via


NumberFormat.ParseIntegerOnly Property

Definition

Returns true if this format will parse numbers as integers only. -or- Sets whether to ignore the fraction part of a number when parsing (defaults to false).

public virtual bool ParseIntegerOnly { [Android.Runtime.Register("isParseIntegerOnly", "()Z", "GetIsParseIntegerOnlyHandler", ApiSince=24)] get; [Android.Runtime.Register("setParseIntegerOnly", "(Z)V", "GetSetParseIntegerOnly_ZHandler", ApiSince=24)] set; }
[<get: Android.Runtime.Register("isParseIntegerOnly", "()Z", "GetIsParseIntegerOnlyHandler", ApiSince=24)>]
[<set: Android.Runtime.Register("setParseIntegerOnly", "(Z)V", "GetSetParseIntegerOnly_ZHandler", ApiSince=24)>]
member this.ParseIntegerOnly : bool with get, set

Property Value

true if this will parse integers only

Attributes

Remarks

Property getter documentation:

Returns true if this format will parse numbers as integers only. For example in the English locale, with ParseIntegerOnly true, the string "1234." would be parsed as the integer value 1234 and parsing would stop at the "." character. The decimal separator accepted by the parse operation is locale-dependent and determined by the subclass.

Java documentation for android.icu.text.NumberFormat.isParseIntegerOnly().

Property setter documentation:

Sets whether to ignore the fraction part of a number when parsing (defaults to false). If a string contains a decimal point, parsing will stop before the decimal point. Note that determining whether a character is a decimal point depends on the locale.

For example, in <em>en-US</em>, parsing the string "123.45" will return the number 123 and parse position 3.

Java documentation for android.icu.text.NumberFormat.setParseIntegerOnly(boolean).

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.

Applies to