How to convert string to array in objective C. i.e,I have a string,
NSString *str = @\"Hi,How r u\";
This should be converted into an array *NS
NSString *str=@"Hi,How r u";
NSArray *arr = [str componentsSeparatedByString:@","];
NSString *strSecond = [arr objectAtIndex:1];
NSMutableArray *arrSecond = [strSecond componentsSeparatedByString:@" "];
NSString *strHow = [arr objectAtIndex:0];
NSString *strAre = [arr objectAtIndex:1];
NSString *strYou = [arr objectAtIndex:2];
[arr removeObjectAtIndex:1];
[arr addObject:@","];
[arr addObject:strHow];
[arr addObject:strAre];
[arr addObject:strYou];
arr is the desired array.