开发者

Xcode IPhone Parse Server Output

开发者 https://www.devze.com 2023-02-17 13:02 出处:网络
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)

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

精彩评论

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

关注公众号