Posted By

vaishnavi on 12/23/10


Tagged

nsstring


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

vaishnavi
sag333ar
Tintenklecks
cnathan


Encode and decode of strings


 / Published in: Objective C
 

  1. //for decode
  2.  
  3. NSString *decode=[encodedString stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
  4.  
  5. //for encode
  6.  
  7. NSString *encode=[decodedString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

Report this snippet  

You need to login to post a comment.