<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Decimal/ParseStrategy/parse(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:So9NSDecimala10FoundationE13ParseStrategyV5parseyABSSKF"
  },
  "title" : "parse(_:)"
}
-->

# parse(_:)

Parses a decimal string in accordance with this strategy and returns the parsed value.

```
func parse(_ value: String) throws -> Format.FormatInput
```

## Parameters

`value`

The string to parse.

## Return Value

The parsed integer value.

## Discussion

Use this method to repeatedly parse decimal strings with the same [`Decimal.ParseStrategy`](/documentation/Foundation/Decimal/ParseStrategy). To parse a single decimal string, use the initializers inherited from [`Decimal`](/documentation/Foundation/Decimal) that take a <doc://com.apple.documentation/documentation/Swift/String> and a [`Decimal.FormatStyle`](/documentation/Foundation/Decimal/FormatStyle) as parameters.

This method throws an error if the parse strategy can’t parse the provided string.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)