Guest User

Untitled

a guest
May 22nd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. guard let url = URL(string: query) else {
  2. print("error")
  3. return
  4. }
  5.  
  6. let unencodedUrlString = "áűáeqw"
  7. guard let encodedUrlString = unencodedUrlString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed), let url = URL(string: encodedUrlString) { return }
Add Comment
Please, Sign In to add comment