raylib-lua-legacy/tools/lua2str.lua

12 lines
236 B
Lua
Raw Normal View History

2020-02-26 23:14:24 +00:00
local output = io.open(arg[1], "w")
output:write("const char *" .. arg[2] .. " = ")
for i=3,#arg do
for line in io.lines(arg[i]) do
output:write(string.format('%q "\\n"', line) .. '\n')
end
end
output:write ";"
output:close()