# Repeat - 指令碼與圖表函數

Repeat() 會形成一個字串，包含的輸入字串重複第二個引數所定義的次數。

語法：

Repeat(text[, repeat\_count])

傳回的資料類型： 字串

引數：

Repeat 引數

| 引數 | 描述 |
| --- | --- |
| text | 原始字串。 |
| repeat\_count | 定義字串 text 中要在輸出字串中重複的字元的次數。 |

範例與結果：

範例與結果

| 範例 | 結果 |
| --- | --- |
| `Repeat( ' * ', rating )` when rating = 4 | 傳回 ' \* \* \* \* ' |