# utf8_add_to_width_cache

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

```c
static void utf8_add_to_width_cache(const char *s)
```

## Parameters

- `s` (`const char *`)

## Called by

- [`utf8_update_width_cache`](/en/tmux/latest/reference/c-function-utf8_update_width_cache/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L428)

## Calls

- [`strtonum`](/en/tmux/latest/reference/c-function-strtonum/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L335)
- [`utf8_fromcstr`](/en/tmux/latest/reference/c-function-utf8_fromcstr/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L381)
- [`utf8_insert_width_cache`](/en/tmux/latest/reference/c-function-utf8-c-utf8_insert_width_cache/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L378)
- [`xstrdup`](/en/tmux/latest/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L328)

## Referenced declarations

- [`utf8_data.data`](/en/tmux/latest/reference/c-struct-utf8_data-data/) (attribute)
- [`utf8_data.size`](/en/tmux/latest/reference/c-struct-utf8_data-size/) (attribute)
- [`utf8_no_width`](/en/tmux/latest/reference/c-variable-utf8-c-utf8_no_width/) (attribute)
- [`utf8_data.width`](/en/tmux/latest/reference/c-struct-utf8_data-width/) (attribute)
- [`utf8_width_item.width`](/en/tmux/latest/reference/c-struct-utf8_width_item-width/) (attribute)
