Why is Newline required at end of file?

Quang Hiếu

New member
Why is Newline required at end of file?
Answer
If however you have a text file format where you require the newline, you get simple data verification very cheap: if the file ends with a line that has no newline at the end, you know the file is broken. With only one extra byte for each line, you can detect broken files with high accuracy and almost no CPU time.
 

Tìm kiếm

Back
Top