Parsing a simple text file, row per row
Parsing a simple text file, row per row
- Subject: Parsing a simple text file, row per row
- From: "Frederick C. Lee" <email@hidden>
- Date: Mon, 1 Aug 2005 10:34:38 -0700
Greetings:
I have a simple text file the with each line ending in a line
feed (\n); or so I believe.
NSString *acDataString = [NSString
stringWithContentsOfFile:rawAreaCodes encoding:NSASCIIStringEncoding
error:myError];
NSArray *acRawRows = [acDataString
componentsSeparatedByString:@"\n"]; <-- doesn't see "\n" (apparently).
What I get is the ENTIRE data file in ONE array element. The
'componentsSeparatedByString' apparently doesn't work with @"\n".
I don't want to put a printable character after each line.
How can I make the parser SEE '\n'?
Ric.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden