View Single Post
Old 06-26-2019, 05:13 AM   #24
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,799
Default

Quote:
Well, if you don't remove the newline chars now, then you will likely still have to deal with them at some point (especially because there could de different versions, depending on source file, OS, etc.).
As I'm not sure file_string actually return this character, it seems to check file line after line (so stripping new line character).
Anyway, it works on windows like that, so if it works on mac too, it will be a valid solution


Have you tried it on Mac ?



Quote:
It doesn't mention file_string(), so maybe it works different from file_var() in this regard? Or maybe it depends on whether the last line has newline chars or not?
Not sure what happen there indeed, but from the end user point of view, having to know that he have to leave an empty line at the end of the file is a necessary information (it will be better to not have to remember such details).


Thx for the assistance
X-Raym is offline   Reply With Quote