Created
April 7, 2017 08:35
-
-
Save rcerrejon/93c0c3cd6b9adbb7ed01be1b26f9cef2 to your computer and use it in GitHub Desktop.
String to URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let stringOriginal = "http://www.google.de/json?origin with space" | |
let stringUrlEnc = stringOriginal.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment