Re: Slice a .txt file in lines
Re: Slice a .txt file in lines
- Subject: Re: Slice a .txt file in lines
- From: Sean Murphy <email@hidden>
- Date: Tue, 20 Jun 2006 13:44:46 -0400
On Jun 20, 2006, at 11:48 AM, Douglas Davidson wrote:
This code assumes that the file uses a single line terminator
consistently throughout. Andreas' method will use whatever
terminators occur in the file.
One other note is that there are two sets of methods: one that
uses the word "line", and another that uses the word "paragraph".
The distinction is because there are line separators that are not
paragraph separators, U+0085 NEXT LINE and U+2028 LINE SEPARATOR.
This distinction may or may not be important depending on what you
are trying to do.
On Jun 20, 2006, at 11:44 AM, Andreas Mayer wrote:
This assumes that there is only one type of line ending character
in a single file.
I'm not sure this assumption is necessarily true.
Thank you both Douglas and Andreas. I'm glad I decided to post my
code, and will keep its limitations in mind (and take this as a
reminder to write more defensively, minus assumptions).
Nevertheless, the text files my program is processing are consistent
with one line terminator, and I guess I just modeled my code with
that in mind.
Thanks again for taking the time to point those facts out.
-Murph
_______________________________________________
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