Encode and decode of strings


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your HTML
  1. //for decode
  2.  
  3. NSString *decode=[encodedString stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
  4.  
  5. //for encode
  6.  
  7. NSString *encode=[decodedString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.