# regsub_copy

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

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

## Parameters

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

## Called by

- [`regsub`](/en/tmux/3.2a/reference/c-function-regsub/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/regsub.c#L80)
- [`regsub_expand`](/en/tmux/3.2a/reference/c-function-regsub-c-regsub_expand/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/regsub.c#L49)

## Calls

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