Question : urlencode string swift
Answered by : mobile-star
let originalString = "test/test"
let escapedString = originalString.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed)
print(escapedString!)
Source : | Last Update : Thu, 13 Feb 20
Question : swift url encode string
Answered by : annoying-angelfish-2ppawtnwy6t7
var urlString = originalString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
Source : https://stackoverflow.com/questions/24879659/how-to-encode-a-url-in-swift | Last Update : Tue, 12 May 20