开发者

How to retrieve part of the NSString * from NSString *

I want to ask an NSString * question. I have a NSString * object. Th开发者_如何学Ce content is like the following example. (like the CSV file)

Example: (my file is longer than this one so much)

First Name,Last Name,Middle Name,Phone,Chan,Tim,Man,123-456-789,Tom,,,987-654-321

(if it is empty, no space between the ',')

How can I use the objective C to storage different value by the NSArray * or NSMutableArray *? Thank you very much.


you can NSArray* arr = [aString componentsSeparatedByString:@","]


Use This Code :

NSArray* arrCountryName = (NSArray *)[yourString componentsSeparatedByString: @","];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜