Re: Append newline to files
- From: Jürgen Exner <jurgenex@xxxxxxxxxxx>
- Date: Tue, 29 Jul 2008 20:14:01 GMT
Martijn Lievaart <m@xxxxxxxxxxxxxxxx> wrote:
2) Or investigate if it are only the Windows files missing a trailing
lineseparator, it's a typical Windows problem.
And here you just fell into the trap.
If "\n" is a line _seperator_, then a trailing line separator would
simply indicate another emtpy line at the end of the file:
"foo\nbar\n"
would contains 3 lines, 'foo', 'bar' and an empty line.
If on the other hand "\n" is a line _terminator_ then the above string
would contain 2 lines. And
"foo\nbar\n\buzz"
would still be only two lines with some trailing junk.
jue
.
- Follow-Ups:
- Re: Append newline to files
- From: Martijn Lievaart
- Re: Append newline to files
- References:
- Append newline to files
- From: p19010101
- Re: Append newline to files
- From: Martijn Lievaart
- Append newline to files
- Prev by Date: Re: Append newline to files
- Next by Date: Re: Is there any module to get the cdrom infomation?
- Previous by thread: Re: Append newline to files
- Next by thread: Re: Append newline to files
- Index(es):