# format_trim_right

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

```c
char * format_trim_right(const char *expanded, u_int limit)
```

## Parameters

- `expanded` (`const char *`)
- `limit` (`u_int`)

## Called by

- [`format_replace`](/en/tmux/3.7c/reference/c-function-format-c-format_replace/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L5561)
- [`menu_add_item`](/en/tmux/3.7c/reference/c-function-menu_add_item/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/menu.c#L119)

## Calls

- [`format_leading_hashes`](/en/tmux/3.7c/reference/c-function-format-draw-c-format_leading_hashes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format-draw.c#L1205)
- [`format_skip`](/en/tmux/3.7c/reference/c-function-format_skip/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format-draw.c#L1224)
- [`format_width`](/en/tmux/3.7c/reference/c-function-format_width/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format-draw.c#L1197)
- [`utf8_append`](/en/tmux/3.7c/reference/c-function-utf8_append/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format-draw.c#L1233)
- [`xcalloc`](/en/tmux/3.7c/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format-draw.c#L1202)
- [`xstrdup`](/en/tmux/3.7c/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format-draw.c#L1199)

## Other function references

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

## Referenced declarations

- [`utf8_data.data`](/en/tmux/3.7c/reference/c-struct-utf8_data-data/) (attribute)
- [`utf8_data.have`](/en/tmux/3.7c/reference/c-struct-utf8_data-have/) (attribute)
- [`utf8_data.size`](/en/tmux/3.7c/reference/c-struct-utf8_data-size/) (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)
