URL
struct URL : ReferenceConvertible, Equatable
-
Mechanica
Returns a Dictionary containing the query parameters (is any).
Declaration
Swift
public var queryParameters: [String : String]? { get }
-
Removes a specified number of path components from
self
.This function may either remove a path component or append /… If the URL has an empty path (e.g., http://www.example.com), then this function will return the URL unchanged.
Declaration
Swift
public mutating func deleteLastPathComponents(_ numberOfPathComponents: Int)
Parameters
numberOfPathComponents
components to be removed.
-
Mechanica
This function may either remove a path component or append /… If the URL has an empty path (e.g., http://www.example.com), then this function will return the URL unchanged.
Declaration
Swift
public func deletingLastPathComponents(_ numberOfPathComponents: Int) -> URL
Parameters
numberOfPathComponents
components to be removed.
Return Value
Returns a URL constructed by removing a specified number of path components.