This repository has been archived on 2024-04-19. You can view files and clone it, but cannot push or open issues or pull requests.
FREAX/etc/lib/luaex
2022-07-18 19:33:40 +02:00

31 lines
556 B
Text

function stringToByteArray(str)
return string.byte(str, 1, str:len())
end
function argsToTable(...)
return { ... }
end
function stringFromByteArray(...)
return string.char(...)
end
function iterateFileLines(path)
local handle = fs.open(path, "r")
local commands = {}
local line = handle.readLine()
while line do
commands[#commands + 1] = line
line = handle.readLine()
end
handle.close()
return commands
end
local function string_separate(str)
local t = {}
for i in string.gmatch(str, "[A-z]") do
table.insert(t, i)
end
return t
end