I am trying to remove all the parentheses in my string in iOS. Saw this stackoverflow post: how to remove spaces, brackets and " from nsarray
The answer:
Simply do this like below:
NSString *finalStr = [initialStr stringByReplacingOccurenceOfString:@"(" withString:@""]; finalStr = [finalStr stringByReplacingOccurenceOfString:@")" withString:@""];
This will remove all the parentheses from the string:I found this answer on this developer's blog