开发者

Xcode IPhone Parse Server Output

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"];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜