# repeat {#repeat}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax}

`repeat(X, n)`

## Arguments {#arguments}

**X** is a string scalar/vector.

**n** is a positive integer.

## Details {#details}

Repeats each item in string *X* *n* times to form a new string. The size of the result is the same as the size of *X*.

## Examples {#examples}

```
repeat(`FB, 3);
// output: FBFBFB

repeat(`AB`CD,2);
// output: ["ABAB","CDCD"]
```

