I am sending some data to the server that is coming back a开发者_如何学运维s a string, but i need to parse it at the carriage return (new line)
The variable the output is being stored in is
NSString *serverOutput = [[NSString alloc] initWithData: dataurl encoding:NSASCIIStringEncoding];
The output is: 1bac92c2-b83a-4c93-9e11-831115825fa9\nmike1\nmike2\nfoo@bar.ca\n2
Any suggestions or help?
Something like this:
NSString *serverOutput = @"1bac92c2-b83a-4c93-9e11-831115825fa9\nmike1\nmike2\nfoo@bar.ca\n2";
NSArray *myData = [serverOutput componentsSeparatedByString:@"\n"];
精彩评论