@Repeat()

2.0 新增

生成重复值数组

数组起始版本 2.0.0

参数

名称类型必填默认值说明
valueString要重复的值
countInteger1重复次数,默认1

用法

@Repeat(value)

重复值1次

示例:
@Repeat(hello)
输出:
["hello"]
@Repeat(value,count)

重复值N次

示例:
@Repeat(hello,3)
输出:
["hello","hello","hello"]
← 返回函数参考