<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/URL/ParseStrategy/parse(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation3URLV13ParseStrategyV5parseyACSSKF"
  },
  "title" : "parse(_:)"
}
-->

# parse(_:)

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

```
func parse(_ value: String) throws -> URL
```

## Parameters

`value`

The string to parse.

## Return Value

The parsed integer value.

## Discussion

Use this method to repeatedly parse integer strings with the same [`URL.ParseStrategy`](/documentation/Foundation/URL/ParseStrategy). To parse a single integer string, use the URL initializer [`init(_:strategy:)`](/documentation/Foundation/URL/init(_:strategy:)).

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)