# Repeat - スクリプトおよびチャート関数

Repeat() は、指定された文字列を、2 番目の引数で指定された回数分繰り返した文字列を返します。

構文:

Repeat(text[, repeat\_count])

戻り値データ型： 文字列

引数：

引数

| 引数 | 説明 |
| --- | --- |
| text | 元の文字列。 |
| repeat\_count | text 文字列の文字が出力文字列で繰り返される回数を定義します。 |

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions/Repeat.htm)

#### 例: チャートの数式

| 例 | 結果 |
| --- | --- |
| `Repeat( ' * ', rating )` when rating = 4 | '\*\*\*\*' を返します |

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions/Repeat.htm)

#### 例: ロード スクリプト

```
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? |