String

extension String: UrlConvertible
  • url

    Returns self by converting into a url. All characters are encoded to be allowed in host as well as path strings. If conversion is not possible for some reason, nil is returned.

    Declaration

    Swift

    public var url: URL? { get }