---
title: "init(format:lenient:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/floatingpointparsestrategy/init(format:lenient:)-5nxey"
---

# init(format:lenient:)

Creates a parse strategy instance using the specified floating-point format style.

## Declaration

```swift
init<Value>(format: Format, lenient: Bool = true) where Format == FloatingPointFormatStyle<Value>, Value : BinaryFloatingPoint
```

## Parameters

- `format`: A configured doc://com.apple.foundation/documentation/Foundation/FloatingPointFormatStyle that describes the string format to parse.
- `lenient`: A Boolean value that indicates whether the parse strategy should permit some discrepencies when parsing. Defaults to true.

## See Also

### Creating a floating-point parse strategy

- [init(format:lenient:)](foundation/floatingpointparsestrategy/init(format:lenient:)-9g6wm.md)
- [init(format:lenient:)](foundation/floatingpointparsestrategy/init(format:lenient:)-1nldg.md)
