Repeat - 脚本和图表函数
Repeat() 用于构成特定字符串,其中包含重复的输入字符串,重复次数由第二个参数定义。
语法:
Repeat(text[, repeat_count])
返回数据类型: 字符串
参数:
参数
|
text
|
原始字符串。 |
|
repeat_count
|
定义字符串 text 的字符在输出字符串中重复的次数。 |
| Repeat( ' * ', rating ) when rating = 4 |
返回 '****' |
T1: Load *, repeat(String,2) as Repeat; Load * inline [ String hello world! hOw aRe you? ];
结果
| 字符串 |
重复 |
| hello world! |
hello world!hello world! |
| hOw aRe you? |
hOw aRe you?hOw aRe you? |