I\'m dealing with an urlencoded string in objective-c. Is there a foundation function that actually reverse the urlENCODING?
The string received is like: K%FChlschr
Apple has depreacted stringByReplacingPercentEscapesUsingEncoding:
since iOS9. Please use stringByRemovingPercentEncoding.
The new method, Returns a new string made from the receiver by replacing all percent-encoded sequences with the matching UTF-8 characters.
Example:
NSString *encodedLink = @"hello%20world";
NSString *decodedUrl = [encodedLink stringByRemovingPercentEncoding];
NSLog (@"%@", decodedUrl);
Output:
hello world