I want to make a very simple task in objective-c under IOS5: convert URL string to its escaped representation.
I tried a lot of ways to do it but neither seemed to work.
I can not make stringByAddingPercentEscapesUsingEncoding: NSASCIIStringEncoding work. It converts letters like áíűőüöúóé but does not convert others like =.
I’d like to have a function like Uri.EscapeDataString ( http://msdn.microsoft.com/en-us/library/system.uri.escapedatastring.aspx ) in .net.
Thanks!
You could add a category to
NSStringthat does something likeReplace
@":/?#[]@!$&’()*+,;="for the chars that you care about.