How do I clear the console in a Lua Program

前端 未结 4 958
梦如初夏
梦如初夏 2021-02-06 03:11

I\'m making my first Lua program with the console, and I need to find out how to remove all the text in the console without just appending a ton of \\n\'s.

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-06 03:34

    If your console understands ANSI terminal escape sequences, try io.write("\027[H\027[2J").

提交回复
热议问题