---
title: "formatted(_:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/binaryfloatingpoint/formatted(_:)-83x4n"
---

# formatted(_:)

Format self with the given format. self is first converted to S.FormatInput type, then format with the given format.

## Declaration

```swift
func formatted<S>(_ format: S) -> S.FormatOutput where S : FormatStyle, S.FormatInput : BinaryFloatingPoint
```
