Rexx - 複製字串



此方法將字串 n 複製多次。

語法

copies(string1,count)

引數

  • string1 - 源字串。

  • count - 要複製字串的次數。

返回值

返回複製 count 次的字串。

示例

/* Main program */ 
a = "Hello" 
say copies(a,3)

執行以上程式後,將得到以下結果。

輸出

HelloHelloHello 
rexx_strings.htm
廣告

© . All rights reserved.