Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. local function tab2space(filename)
  2. local lines = {}
  3. io.input(filename)
  4. for line in io.lines() do
  5. table.insert(lines, line)
  6. end
  7.  
  8. local newLine = {}
  9.  
  10. for _, line in ipairs(lines) do
  11. line = string.gsub(line, "\t", " ")
  12. -- print(line)
  13. table.insert(newLine, line)
  14. end
  15.  
  16. local allLine = table.concat(newLine, "\n")
  17.  
  18. local fp = io.open(filename, "w")
  19. io.output(fp)
  20. io.write(allLine)
  21. io.close(fp)
  22. end
  23.  
  24. tab2space("PlaySceneGA.lua")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement