# utf8_put_item

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

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

## Parameters

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

## Calls

- [`log_debug`](/en/tmux/3.2a/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/utf8.c#L104)
- [`utf8_item_by_data`](/en/tmux/3.2a/reference/c-function-utf8-c-utf8_item_by_data/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/utf8.c#L101)
- [`xcalloc`](/en/tmux/3.2a/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/utf8.c#L112)

## Referenced by

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

## Referenced declarations

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