读入一行数据,按

来源:互联网 发布:mac怎么玩英雄杀 编辑:程序博客网 时间:2024/05/25 23:28
function allword ()local line = io.read()local pos = 1return function ()while line dolocal s,e = string.find(line, "%w+", pos)if s thenpos = e + 1return string.sub(line, s, e)elseline = io.read()pos = 1endendreturn nilendendfor word in allword() doprint(word)end



0 0