Name: Anonymous 2011-09-17 22:28
Why is this telling me to concatenate small strings to the ends of large ones, but not in reverse, and then concatenate all remaining strings in the table?
http://www.lua.org/pil/11.6.html
Wouldn't it just be easier to put all the strings in a table then concatenate them all at once, as in the following?
function filetostring(file)
local t == {}
for line in io.lines(file)
if line == "" then
break
end
table.insert(t, line .. '\n')
return table.concatenate(x)
end
I'm confused as fuck.
http://www.lua.org/pil/11.6.html
Wouldn't it just be easier to put all the strings in a table then concatenate them all at once, as in the following?
function filetostring(file)
local t == {}
for line in io.lines(file)
if line == "" then
break
end
table.insert(t, line .. '\n')
return table.concatenate(x)
end
I'm confused as fuck.