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

> pure function repeat(n: integer ): byte_array Repeats this byte_array n times. Examples: x'1234abcd'.repeat(3) returns x'1234abcd1234abcd1234abcd' x''.repe

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

FUNCTION

# byte\_array.repeat

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

Repeats this byte\_array `n` times.

Examples:

* `x'1234abcd'.repeat(3)` returns `x'1234abcd1234abcd1234abcd'`
* `x''.repeat(3)` returns `x''`
* `x'1234abcd'.repeat(0)` returns `x''`

**Parameters**

* **n** — the number of times to repeat this byte\_array

**Throws**

* `exception` — when: - `n` is negative - `n` is greater than `(2^31)-1` - the resulting byte array 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/byte_array/repeat.html)Generated API reference, mirrored from the live docs
