# regsub_copy

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/regsub.c#L27
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-regsub-c-regsub_copy/

```c
static void regsub_copy(char **buf, ssize_t *len, const char *text, size_t start, size_t end)
```

## Parameters

- `buf` (`char **`)
- `len` (`ssize_t *`)
- `text` (`const char *`)
- `start` (`size_t`)
- `end` (`size_t`)

## Called by

- [`regsub`](/en/tmux/latest/reference/c-function-regsub/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/regsub.c#L82)
- [`regsub_expand`](/en/tmux/latest/reference/c-function-regsub-c-regsub_expand/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/regsub.c#L49)

## Calls

- [`xrealloc`](/en/tmux/latest/reference/c-function-xrealloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/regsub.c#L31)
