# utf8_cstrwidth

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

```c
u_int utf8_cstrwidth(const char *s)
```

## Parameters

- `s` (`const char *`)

## Called by

- [`cmd_list_keys_get_table_width`](/en/tmux/3.7c/reference/c-function-cmd-list-keys-c-cmd_list_keys_get_table_width/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-keys.c#L88)
- [`cmd_list_keys_get_width`](/en/tmux/3.7c/reference/c-function-cmd-list-keys-c-cmd_list_keys_get_width/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-keys.c#L75)
- [`mode_tree_draw`](/en/tmux/3.7c/reference/c-function-mode_tree_draw/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/mode-tree.c#L836)
- [`status_prompt_complete_list_menu`](/en/tmux/3.7c/reference/c-function-status-c-status_prompt_complete_list_menu/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L2002)
- [`status_prompt_complete_window_menu`](/en/tmux/3.7c/reference/c-function-status-c-status_prompt_complete_window_menu/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L2100)
- [`utf8_padcstr`](/en/tmux/3.7c/reference/c-function-utf8_padcstr/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L925)
- [`utf8_rpadcstr`](/en/tmux/3.7c/reference/c-function-utf8_rpadcstr/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L946)

## Calls

- [`utf8_append`](/en/tmux/3.7c/reference/c-function-utf8_append/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L903)

## Other function references

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

## Referenced declarations

- [`utf8_data.have`](/en/tmux/3.7c/reference/c-struct-utf8_data-have/) (attribute)
- [`UTF8_DONE`](/en/tmux/3.7c/reference/c-enum-utf8_state-utf8_done/) (constant)
- [`UTF8_MORE`](/en/tmux/3.7c/reference/c-enum-utf8_state-utf8_more/) (constant)
- [`utf8_data.width`](/en/tmux/3.7c/reference/c-struct-utf8_data-width/) (attribute)
