Skip Navigation
Type MethodMethod

isAbsoluteOrLocal(_:)

Returns whether a URL has a scheme or only refers to a fragment of the current page, so that it needs no resolution.

static func isAbsoluteOrLocal(_ url: String) -> Bool

Parameters

url

The URL to check.

Return Value

true for URLs such as https://example.com, mailto: addresses and #fragment.