IOS Replacing substring in string
NSString* str = @"1,2,3,4";
NSRange replaceRange = [str rangeOfString:@"3,"];
if (replaceRange.location != NSNotFound){
NSString* result = [str stringByReplacingCharactersInRange:replaceRange withString:@""];
}
NSString* str = @"1,2,3,4";
NSRange replaceRange = [str rangeOfString:@"3,"];
if (replaceRange.location != NSNotFound){
NSString* result = [str stringByReplacingCharactersInRange:replaceRange withString:@""];
}
Comments
Post a Comment