Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Url escape/unescape functions in MonoTouch

I am looking for url escape and unescape functions in MonoTouch. Essentially I am looking for the MonoTouch equivalent of the method stringByReplacingPercentEscapesUsingEncoding, as in the follow line of objective-c code:

 NSString *args = [(NSString*)[components objectAtIndex:3]
                   stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

I was expecting to be able to translate this to something like this:

string args = URL.Unescape(components[3]);

Do URL escape/unescape functions exist in MonoTouch or do I have to roll my own?

like image 941
BruceHill Avatar asked Mar 22 '11 21:03

BruceHill


1 Answers

System.Web.HttpUtility.UrlDecode (string s);

Which is in System.Web.Services.dll in monotouch.

like image 189
Geoff Norton Avatar answered Oct 06 '22 03:10

Geoff Norton