views:

34

answers:

1

Hi, everyone,

I want to ask an NSString * question. I have a NSString * object. The 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.

+2  A: 

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

Thank you for your reply. And I would like to ask what will be store about the ,,. It will store ' ', nil, or not object stored in the NSArray *?
Questions
@user265260, this is another question about the NSString I asked, would you mind to see it and it is related to this question. Thank you very much. http://stackoverflow.com/questions/3244287/how-to-insert-nsstring-between-two-nsstring
Questions