// Here We Deleting Something
NSString *content = @”i am a good boy”;
NSCharacterSet *deleteString = [NSCharacterSet characterSetWithCharactersInString:@”good”];
content = [[content componentsSeparatedByCharactersInSet: deleteString] componentsJoinedByString: @””];
NSLog(@”String===>>>%@”, content);
// Here We Replace Something
NSString *replaceString = @”i am a good boy”;
replaceString = [replaceString stringByReplacingOccurrencesOfString:@”boy” withString:@”Man”];
NSLog(@”Replace String===>>>%@”, replaceString);
Discover more from mycodetips
Subscribe to get the latest posts sent to your email.