encodeURIComponent

abstract var encodeURIComponent: (str: String) -> String?(source)

The function to use when converting URL-unsafe characters to percent-encoding in the query string.