lua 字符串截取 存入table中 --定义测试字符串local str = "abc,123,345"splitlist = {}string.gsub(str, '[^,]+', function(w) table.insert(splitlist, w) end )--可以用过打印,看到字符串已经按照“,”截取,并且存入table中 lua 2024-01-17 40 点赞 0 评论 60 浏览