FROM : Sean Murphy
DATE : Tue Jun 20 19:44:46 2006
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
DATE : Tue Jun 20 19:44:46 2006
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
| Related mails | Author | Date |
|---|---|---|
| Neto | Jun 20, 07:44 | |
| Ben Lachman | Jun 20, 08:11 | |
| Andreas Mayer | Jun 20, 14:38 | |
| Sean Murphy | Jun 20, 17:13 | |
| Andreas Mayer | Jun 20, 17:44 | |
| Douglas Davidson | Jun 20, 17:48 | |
| Sean Murphy | Jun 20, 19:44 | |
| Neto | Jun 21, 05:59 |






Cocoa mail archive

