View Single Post
Old 06-26-2019, 04:46 AM   #23
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,143
Default

Quote:
Originally Posted by X-Raym View Post
Do you see anything wrong with this method ?
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.).

And about file_avail() and text files, this is what the JSFX documentation says:

Quote:
Note that file_avail() should be called to check for EOF after each read, and if it returns 0, the last file_var() should be ignored.
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?
Tale is online now   Reply With Quote