语言

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

属性值

填充带格式的数字时使用的最小输出宽度。

特性

注解

属性 getter 文档:

返回格式化输出中的最小字符数。

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

属性 setter 文档:

填充: 通过格式设置管道设置字符串输出的最小宽度。 例如,如果启用填充并将 paddingWidth 设置为 6,则使用模式“0.00”设置数字“3.14159”将导致“··如果“·”是填充字符串,则为 3.14”。

如果数字超过填充宽度,则数字将显示为未指定填充宽度,这可能会导致字符串超过填充宽度。

可以使用“*”符号在模式字符串中指定填充。 例如,格式“*x ###### 0”的格式宽度为 7,填充符为“x”。

填充当前以 UTF-16 代码单元计数;有关详细信息,请参阅 票证 #13034 。

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

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于