[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Loop through a string "lines" at a time
- From: "Mark Edgar" <medgar123+lua-l@...>
- Date: Mon, 2 Jul 2007 15:22:31 -0700
for line in lines:gmatch"(.-)\n" do
io.write(">>", line, "<<\n")
end
However, this misses the last (partial) line in cases where 'lines'
does not end in a newline.
-Mark