Remove a character from string within a range

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

Copy this code and paste it in your HTML
  1. NSString *str = @"";
  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


RSS Icon Subscribe to comments

You need to login to post a comment.