---
title: "init(_:strategy:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/decimal/init(_:strategy:)"
---

# init(_:strategy:)

Creates and initializes a decimal by parsing an arbitrary type according to the provided parse strategy.

## Declaration

```swift
init<S>(_ value: S.ParseInput, strategy: S) throws where S : ParseStrategy, S.ParseOutput == Decimal
```

## Parameters

- `value`: An instance of strategy’s input type.
- `strategy`: A parse strategy that describes how the parser converts the string to a decimal value.

## See Also

### Creating a decimal by parsing a string

- [init(_:format:lenient:)](foundation/decimal/init(_:format:lenient:)-6fk71.md)
- [init(_:format:lenient:)](foundation/decimal/init(_:format:lenient:)-8t5o2.md)
- [init(_:format:lenient:)](foundation/decimal/init(_:format:lenient:)-3u6o6.md)
- [init(string:locale:)](foundation/decimal/init(string:locale:).md)
- [Decimal.ParseStrategy](foundation/decimal/parsestrategy.md)
