Skip to content

Instantly share code, notes, and snippets.

@jlegeny
Created August 13, 2020 08:40
Show Gist options
  • Save jlegeny/798c15db0488ad38c2e3a520f18f462d to your computer and use it in GitHub Desktop.
Save jlegeny/798c15db0488ad38c2e3a520f18f462d to your computer and use it in GitHub Desktop.
func addingPercentEncodingForRFC3986() -> String? {
let unreserved = "-._~/?"
var allowed = CharacterSet.alphanumerics
allowed.insert(charactersIn: unreserved)
return self.addingPercentEncoding(withAllowedCharacters: allowed)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment