I want to split string into NSMutableArray
I know
- (NSArray *)componentsSeparatedByString:(NSString *)separator
is available but this one is for NSArray not for NSMutableArray.
I need because after spliting i want to remove element from array by using
-(void)removeObjectAtIndex:(NSUInteger)index
which is not possible with NSArray.
Thank you
You can also just get a mutable copy of the returned array:
Also, remember that copy, like alloc, does allocate new memory. So when used in non-ARC code you must
autoreleasethe copied array or manuallyreleaseit when you are done with it.