# utf8_put_item

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L435
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-utf8-c-utf8_put_item/

```c
static int utf8_put_item(const u_char *data, size_t size, u_int *index)
```

## Parameters

- `data` (`const u_char *`)
- `size` (`size_t`)
- `index` (`u_int *`)

## Calls

- [`log_debug`](/en/tmux/3.7c/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L442)
- [`utf8_item_by_data`](/en/tmux/3.7c/reference/c-function-utf8-c-utf8_item_by_data/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L439)
- [`xcalloc`](/en/tmux/3.7c/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L450)

## Referenced by

- [`utf8_from_data`](/en/tmux/3.7c/reference/c-function-utf8_from_data/) (function)

## Referenced declarations

- [`utf8_item.data`](/en/tmux/3.7c/reference/c-struct-utf8_item-data/) (attribute)
- [`utf8_item.index`](/en/tmux/3.7c/reference/c-struct-utf8_item-index/) (attribute)
- [`utf8_item.size`](/en/tmux/3.7c/reference/c-struct-utf8_item-size/) (attribute)
- [`utf8_next_index`](/en/tmux/3.7c/reference/c-variable-utf8-c-utf8_next_index/) (attribute)
