Rexx - copies() 方法

此方法将字符串复制n次。

语法

copies(string1,count)

参数

  • string1 − 源字符串。

  • count − 复制字符串的次数。

返回值

返回字符串,复制count次。

示例

/* 主程序 */
a = "Hello" 
say copies(a,3)

当我们运行上面的程序时,我们将得到以下结果。

输出

HelloHelloHello 

❮ rexx_strings.html