String

extension String: URLComponentsConvertible
  • 如果构造成功则返回一个 URLComponents,否则抛出异常.

    Throws

    一个RouteError.badURL(url:) 实例.

    Declaration

    Swift

    public func asURLComponents() throws -> URLComponents

    Return Value

    构造成功的URLComponents