# utf8_cstrwidth

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

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

## Parameters

- `s` (`const char *`)

## Called by

- [`cmd_list_keys_exec`](/en/tmux/3.2a/reference/c-function-cmd-list-keys-c-cmd_list_keys_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L231)
- [`cmd_list_keys_get_width`](/en/tmux/3.2a/reference/c-function-cmd-list-keys-c-cmd_list_keys_get_width/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L76)
- [`mode_tree_draw`](/en/tmux/3.2a/reference/c-function-mode_tree_draw/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/mode-tree.c#L704)
- [`status_prompt_complete_list_menu`](/en/tmux/3.2a/reference/c-function-status-c-status_prompt_complete_list_menu/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/status.c#L1560)
- [`status_prompt_complete_window_menu`](/en/tmux/3.2a/reference/c-function-status-c-status_prompt_complete_window_menu/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/status.c#L1653)
- [`utf8_padcstr`](/en/tmux/3.2a/reference/c-function-utf8_padcstr/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/utf8.c#L549)
- [`utf8_rpadcstr`](/en/tmux/3.2a/reference/c-function-utf8_rpadcstr/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/utf8.c#L570)

## Calls

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

## Other function references

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

## Referenced by

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

## Referenced declarations

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