您需要 登录 才可以下载或查看,没有账号?register
table.concat(table [, sep [, i [, j]]])
local fruits = {"apple", "banana", "cherry", "date"} -- 使用逗号加空格分隔符,连接整个表 print(table.concat(fruits, ", ")) -- 输出: apple, banana, cherry, date -- 只连接第 2 到第 3 个元素 print(table.concat(fruits, ", ", 2, 3)) -- 输出: banana, cherry
举报
本版积分规则 发表回复 回帖后跳转到最后一页
|雪舞知识库 ( 浙ICP备15015590号-1 | 萌ICP备20232229号|浙公网安备33048102000118号 )|天天打卡
GMT+8, 2026-6-19 16:14 , Processed in 0.051213 second(s), 24 queries .
Powered by Discuz! X5.0
© 2001-2026 Discuz! Team.