# grid_string_cells

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

```c
char * grid_string_cells(struct grid *gd, u_int px, u_int py, u_int nx, struct grid_cell **lastgc, int with_codes, int escape_c0, int trim)
```

## Parameters

- `gd` (`struct grid *`)
- `px` (`u_int`)
- `py` (`u_int`)
- `nx` (`u_int`)
- `lastgc` (`struct grid_cell **`)
- `with_codes` (`int`)
- `escape_c0` (`int`)
- `trim` (`int`)

## Called by

- [`cmd_capture_pane_history`](/en/tmux/3.2a/reference/c-function-cmd-capture-pane-c-cmd_capture_pane_history/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-capture-pane.c#L177)
- [`grid_view_string_cells`](/en/tmux/3.2a/reference/c-function-grid_view_string_cells/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/grid-view.c#L234)

## Calls

- [`grid_get_cell`](/en/tmux/3.2a/reference/c-function-grid_get_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/grid.c#L978)
- [`grid_peek_line`](/en/tmux/3.2a/reference/c-function-grid_peek_line/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/grid.c#L974)
- [`grid_string_cells_code`](/en/tmux/3.2a/reference/c-function-grid-c-grid_string_cells_code/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/grid.c#L983)
- [`xmalloc`](/en/tmux/3.2a/reference/c-function-xmalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/grid.c#L971)
- [`xreallocarray`](/en/tmux/3.2a/reference/c-function-xreallocarray/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/grid.c#L998)

## Referenced by

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

## Referenced declarations

- [`grid_line.cellsize`](/en/tmux/3.2a/reference/c-struct-grid_line-cellsize/) (attribute)
- [`grid_cell.data`](/en/tmux/3.2a/reference/c-struct-grid_cell-data/) (attribute)
- [`utf8_data.data`](/en/tmux/3.2a/reference/c-struct-utf8_data-data/) (attribute)
- [`grid_cell.flags`](/en/tmux/3.2a/reference/c-struct-grid_cell-flags/) (attribute)
- [`grid`](/en/tmux/3.2a/reference/c-struct-grid/) (struct)
- [`grid_cell`](/en/tmux/3.2a/reference/c-struct-grid_cell/) (struct)
- [`grid_default_cell`](/en/tmux/3.2a/reference/c-variable-grid_default_cell/) (attribute)
- [`GRID_FLAG_PADDING`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_flag_padding/) (constant)
- [`utf8_data.size`](/en/tmux/3.2a/reference/c-struct-utf8_data-size/) (attribute)
