# format_width

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format-draw.c#L1088
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-format_width/

```c
u_int format_width(const char *expanded)
```

## Parameters

- `expanded` (`const char *`)

## Called by

- [`format_trim_right`](/en/tmux/latest/reference/c-function-format_trim_right/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format-draw.c#L1197)
- [`menu_add_item`](/en/tmux/latest/reference/c-function-menu_add_item/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/menu.c#L141)
- [`menu_create`](/en/tmux/latest/reference/c-function-menu_create/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/menu.c#L155)
- [`status_prompt_redraw`](/en/tmux/latest/reference/c-function-status_prompt_redraw/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L916)
- [`window_tree_draw_label`](/en/tmux/latest/reference/c-function-window-tree-c-window_tree_draw_label/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L408)

## Calls

- [`format_leading_hashes`](/en/tmux/latest/reference/c-function-format-draw-c-format_leading_hashes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format-draw.c#L1098)
- [`format_skip`](/en/tmux/latest/reference/c-function-format_skip/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format-draw.c#L1102)
- [`utf8_append`](/en/tmux/latest/reference/c-function-utf8_append/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format-draw.c#L1109)

## Other function references

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

## Referenced by

- [`format_replace`](/en/tmux/latest/reference/c-function-format-c-format_replace/) (function)

## Referenced declarations

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