Functions
The following functions are available globally.
-
Overrides the Pattern Match Operator to allow a given
URL
to be matched by someURLMatchable
in context of aswitch
.Example:
switch URL(string: "http://example.com")! { case Host("example.com"): // ... default: // ... }
Declaration
Swift
public func ~= (pattern: URLMatchable, value: URL) -> Bool