So I have an NSString, lets say it: NSString *mainString = @"My Name is Andrew (I like computers)";
And I want remove everything from the "(" to the ")" from mainString. And I want to put everything in between the "()" into a subString.
For example:
NSString *mainString = @"My Name is Andrew (I like computers)";
NSString *subString;
//The code I need help with
mainString = @"y Name is Andrew ";
subString = @"I like computers";
I hope this makes sense. It would really help me. Thanks in Advance. I've been playing with NSRange
and NSMutableStrings
but I'm having trouble. Thanks in advance.