Skip to content

Type Method

fractionLength(_:)

iOS 15.0+ iPadOS 15.0+ Mac Catalyst 15.0+ macOS 12.0+ tvOS 15.0+ watchOS 8.0+
Returns a precision that constrains formatted values to a given number of allowed digits in the fraction part.
static func fractionLength(_ length: Int) -> NumberFormatStyleConfiguration.Precision

Parameters

length

The number of digits to use when formatting the fraction part of a number.

Return Value

A precision that constrains formatted values to a given number of allowed digits in the fraction part.