Objective C - Read plaintext multicolumn file into several column arrays
I have s开发者_如何转开发een several threads about file handling in Objective C but can't find a simple systematic way to do this: let's say you have a multicolumn data files where each x y z ... columns are separated by tabs. What I want to do is just converting each column to a specific array. I have almost no experience with Objective C but I do know C++.
Thank you in advance.
Use a NSString method to do this after reading it with stringWithContentsOfFile:...
:
split it into a line-array with
componentsSeperatedByString:@"\n"
split each line-array line with
componentsSeperatedByString:@"\t"
精彩评论