# Repeat - script and chart function

Repeat() forms a string consisting of the input string repeated the number of times defined by the second argument.

Syntax:

Repeat(text[, repeat\_count])

Return data type: string

Arguments:

Arguments

| Argument | Description |
| --- | --- |
| text | The original string. |
| repeat\_count | Defines the number of times the characters in the string text are to be repeated in the output string. |

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

#### Example: Chart expression

| Example | Result |
| --- | --- |
| `Repeat( ' * ', rating )` when rating = 4 | Returns '\*\*\*\*' |

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

#### Example: Load script

```
T1:
Load *,
repeat(String,2) as Repeat;
Load * inline [
String
hello world!
hOw aRe you? ]; 
```

Result

| String | Repeat |
| --- | --- |
| hello world! | hello world!hello world! |
| hOw aRe you? | hOw aRe you?hOw aRe you? |