語言

DecimalFormat.FormatWidth 屬性

定義

回傳格式化輸出的最小字元數。 -或- 內傾: 設定格式化管線輸出字串的最小寬度。

public virtual int FormatWidth { [Android.Runtime.Register("getFormatWidth", "()I", "GetGetFormatWidthHandler", ApiSince=24)] get; [Android.Runtime.Register("setFormatWidth", "(I)V", "GetSetFormatWidth_IHandler", ApiSince=24)] set; }
[<get: Android.Runtime.Register("getFormatWidth", "()I", "GetGetFormatWidthHandler", ApiSince=24)>]
[<set: Android.Runtime.Register("setFormatWidth", "(I)V", "GetSetFormatWidth_IHandler", ApiSince=24)>]
member this.FormatWidth : int with get, set

屬性值

填充的最小輸出寬度,或停用填充時的非正值。

屬性

備註

財產取得者文件:

回傳格式化輸出的最小字元數。

Java 文件 android.icu.text.DecimalFormat.getFormatWidth()。

屬性設定文件:

填充: 設定格式化管線輸出字串的最小寬度。 例如,若啟用填充且 paddingWidth 設為 6,將數字「3.14159」格式化為「0.00」,則會得到「··如果你的填充繩是 '·',則是 3.14 吋。

如果數字比填充寬度還長,數字會顯示為沒有指定填充寬度,這可能導致字串比填充寬度還長。

填充可以用 '*' 符號在圖案字串中指定。 例如,格式「*x ###### 0」的格式寬度為7,填充字元為「x」。

填充目前以 UTF-16 碼單位計算;詳情請參見 票券編號#13034 。

Java 文件 android.icu.text.DecimalFormat.setFormatWidth(int)。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於