mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
file.readlines
This commit is contained in:
parent
1f3cf5ed53
commit
8054d4ba55
1 changed files with 9 additions and 0 deletions
|
|
@ -276,6 +276,15 @@ function table.tostring(t)
|
|||
return s..']'
|
||||
end
|
||||
|
||||
function file.readlines(path)
|
||||
local str = file.read(path)
|
||||
local lines = {}
|
||||
for s in str:gmatch("[^\r\n]+") do
|
||||
table.insert(lines, s)
|
||||
end
|
||||
return lines
|
||||
end
|
||||
|
||||
-- Deprecated functions
|
||||
block_index = block.index
|
||||
block_name = block.name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue