---
title: "format(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/decimal/formatstyle/currency/format(_:)"
---

# format(_:)

Formats a decimal value, using this style.

## Declaration

```swift
func format(_ value: Decimal) -> String
```

## Parameters

- `value`: The floating-point value to format.

## Return Value

Return Value A string representation of value, formatted according to the style’s configuration.

## Discussion

Discussion Use this method when you want to create a single style instance, and then use it to format multiple decimal values. To format a single decimal value, use the Decimal instance method formatted(_:), passing in an instance of Decimal.FormatStyle.Currency.
