假设我有这个 .txt 文件:
this is line one hello world line three
在Lua中,我想仅使用第二行的内容创建一个字符串,就像我想从该文件中获取特定行并将其放入字符串中 io.open('file.txt', 'r') -- 读取仅第二行并将其放入字符串中,例如:local line2 =“hello world”
lua
lua ×1