函数:table.concat 数组连接

函数名称:连接数组

函数功能:连接数组

函数方法

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

参数 类型 必填 说明
tb table 待操作数组
sep string 分割的字符
i number tb[i] 起点,不写默认值为 1
j number tb[j] 终点,不写默认值为 #tb
返回值 类型 说明
str string 连接后的字符串

函数示例

tb = {"a","b","c","d",1,2,3,4}
str = table.concat(tb,"|")
dialog(str,5)
Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""