語言

IntegerWidth.TruncateAt(Int32) 方法

定義

在小數分隔符前截斷超過一定數字數的數字。

[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

參數

maxInt
Int32

小數分隔符前的最大位數。 maxInt == -1 表示不截斷。

傳回

一個 IntegerWidth,用於傳遞給 NumberFormatter 的 integerWidth() 設定器。

屬性

備註

在小數分隔符前截斷超過一定數字數的數字。

例如,當 maxInt=3 時,數字 1234 會被印成「234」。

Java 文件 android.icu.number.IntegerWidth.truncateAt(int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於