format(_:)
Formats an decimal, using this style.
Declaration
func format(_ value: Decimal) -> StringParameters
- value:
The decimal to format.
Return Value
A string representation of value, formatted according to the style’s configuration.
Discussion
Use this method when you want to create a single style instance, and then use it to format multiple decimal. To format a single integer, use the 1414588 instance method formatted(_:), passing in an instance of Decimal.FormatStyle.Percent, or call formatted() to use a default style.