Posted By

tenveer on 11/02/10


Tagged

nsstring


Versions (?)

Remove a character from string within a range


 / Published in: Objective C
 

  1. NSString *str = @"i.am.Tanveer";
  2. int stringLength = [str length];
  3. NSRange range = NSMakeRange(0, stringLength);
  4. NSString *newStr = [str stringByReplacingOccurrencesOfString:@"a" withString:@"e" options:NSCaseInsensitiveSearch range:range];

Report this snippet  

You need to login to post a comment.