Windows query
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Windows query
- From: Dirk Laurie <dirk.laurie@...>
- Date: 2016年1月29日 08:34:23 +0200
I'm developing a Lua program under Linux that may in some
not totally unforeseeable future need to run under Windows.
Do line endings get standardized when Lua reads a text file?
More precisely, in the following code snippet, will "line"
contain "\r" characters?
infile = io.open"filename.txt"
source = infile:read"*a"
for line in source:gmatch"[^\n]+" do
-- whatever
end