Skip to main content

parse_uri

Parses a URI string and returns a URI instance, or nil if the string is not a valid URI.

fun parse_uri(_ uri: String) -> (URI?)

Parameters

_ uri: String

The URI string to parse (e.g. https://www.example.com/path?query=1#fragment).

Returns

URI?

The parsed URI, or nil if the string is not a valid URI.