函数:table.concat 数组连接

函数名称:连接数组

函数功能:连接数组

函数方法

str = table.concat (tb,sep,i, j)

必填

参数 类型 说明
tb table 待操作数组
sep string 分割的字符

选填

参数 类型 默认值 说明
i number 1
j number #tb

返回值

返回值 类型 说明
str string 连接后的字符串

函数示例

tb = {"a","b","c","d",1,2,3,4}
str = table.concat(tb,"|")
nLog(str)
Copyright 北京帮你玩科技有限公司 2024 all right reserved,powered by Gitbook该文章修订时间: 2025-03-04 15:43:41

results matching ""

    No results matching ""