Contents

appendPathExtension(_:)

Appends the specified path extension to self.

Declaration

mutating func appendPathExtension(_ pathExtension: String)

Parameters

  • pathExtension:

    The extension to append.

Discussion

If the URL has an empty path, such as http://www.example.com, this function does nothing. Certain special characters (for example, Unicode right-to-left marks) can’t be path extensions. If pathExtension contains any of those characters, the function returns an unchanged URL.

See Also

Adding a path extension