다음을 통해 공유


IntegerWidth.TruncateAt(Int32) Method

Definition

Truncate numbers exceeding a certain number of numerals before the decimal separator.

[Android.Runtime.Register("truncateAt", "(I)Landroid/icu/number/IntegerWidth;", "GetTruncateAt_IHandler", ApiSince=30)]
public virtual Android.Icu.Number.IntegerWidth? TruncateAt (int maxInt);
[<Android.Runtime.Register("truncateAt", "(I)Landroid/icu/number/IntegerWidth;", "GetTruncateAt_IHandler", ApiSince=30)>]
abstract member TruncateAt : int -> Android.Icu.Number.IntegerWidth
override this.TruncateAt : int -> Android.Icu.Number.IntegerWidth

Parameters

maxInt
Int32

The maximum number of places before the decimal separator. maxInt == -1 means no truncation.

Returns

An IntegerWidth for passing to the NumberFormatter integerWidth() setter.

Attributes

Remarks

Truncate numbers exceeding a certain number of numerals before the decimal separator.

For example, with maxInt=3, the number 1234 will get printed as "234".

Java documentation for android.icu.number.IntegerWidth.truncateAt(int).

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