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

maximumIntegerDigits

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

Declaration 宣言

@property NSUInteger maximumIntegerDigits;

Discussion 議論

By default, this property is set to 42. 省略時では、このプロパティは42に設定されます。

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


var numberFormatter = NumberFormatter()


numberFormatter.maximumIntegerDigits = 42 // default
numberFormatter.string(from: 12345) // 12345


numberFormatter.maximumIntegerDigits = 3
numberFormatter.string(from: 12345) // 345

See Also 参照

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