<!--
{
  "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/IntegerParseStrategy/parse(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation20IntegerParseStrategyV5parsey11FormatInputQzSSKF"
  },
  "title" : "parse(_:)"
}
-->

# parse(_:)

Parses an integer 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 integer strings with the same [`IntegerParseStrategy`](/documentation/Foundation/IntegerParseStrategy). To parse a single integer string, use the initializers inherited from <doc://com.apple.documentation/documentation/Swift/BinaryInteger> that take a <doc://com.apple.documentation/documentation/Swift/String> and a [`FormatStyle`](/documentation/Foundation/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)