Instance Property インスタンスプロパティ

minimumIntegerDigits

The minimum number of digits before the decimal separator. 小数分離子の前の最小限の桁数。

Declaration 宣言

@property NSUInteger minimumIntegerDigits;

Discussion 議論

By default, this property is set to 0. 初期状態では、このプロパティは0に設定されます。

The following code demonstrates the effect of setting minimumIntegerDigits when formatting a number: 以下のコードは、minimumIntegerDigitsをある数値を書式設定している時に設定する効果を実演します:


var numberFormatter = NumberFormatter()


numberFormatter.minimumIntegerDigits = 0 // default
numberFormatter.string(from: 123) // 123


numberFormatter.minimumIntegerDigits = 5
numberFormatter.string(from: 123) // 00123

See Also 参照

Configuring Integer and Fraction Digits 整数および小数桁を構成設定する