# text.repeat · Rell standard library · Chromia Docs (concept)

> pure function repeat(n: integer ): text Repeat this text n times. SQL compatible. Examples: 'abc'.repeat(3) returns 'abcabcabc' ''.repeat(3) returns '' 'ab

Source: https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/text/repeat/

FUNCTION

# text.repeat

```signature
pure function repeat(n: integer): text
```

Repeat this text `n` times. SQL compatible.

Examples:

* `'abc'.repeat(3)` returns `'abcabcabc'`
* `''.repeat(3)` returns `''`
* `'abc'.repeat(0)` returns `''`

**Parameters**

* **n** — the number of times to repeat this text

**Returns**

text equal to this text, except repeated `n` times

**Throws**

* `exception` — when: - `n` is negative - `n` is greater than `(2^31)-1` - the resulting text has size greater than `(2^31)-1`

Since 0.11.0

[View this page on docs.chromia.com](https://docs.chromia.com/pages/rell-stdlib/-rell%20-system%20-library/%5Broot%5D/text/repeat.html)Generated API reference, mirrored from the live docs
