Contents

rounded(rule:increment:)

Modifies the format style to use the specified rounding rule and increment.

Declaration

func rounded(rule: IntegerFormatStyle<Value>.Currency.Configuration.RoundingRule = .toNearestOrEven, increment: Int? = nil) -> IntegerFormatStyle<Value>.Currency

Parameters

  • rule:

    The rounding rule to apply to the format style.

  • increment:

    A multiple by which the formatter rounds the fractional part. The formatter produces a value that is an even multiple of this increment. If this parameter is nil (the default), the formatter doesn’t apply an increment.

Return Value

An integer currency format style modified to use the specified rounding rule and increment.

See Also

Customizing style behavior