# grid_string_cells

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1084
- **Page:** https://libtmux.org/en/tmux/latest/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 flags, struct screen *s)
```

## Parameters

- `gd` (`struct grid *`)
- `px` (`u_int`)
- `py` (`u_int`)
- `nx` (`u_int`)
- `lastgc` (`struct grid_cell **`)
- `flags` (`int`)
- `s` (`struct screen *`)

## Called by

- [`cmd_capture_pane_history`](/en/tmux/latest/reference/c-function-cmd-capture-pane-c-cmd_capture_pane_history/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-capture-pane.c#L252)
- [`grid_view_string_cells`](/en/tmux/latest/reference/c-function-grid_view_string_cells/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid-view.c#L234)

## Calls

- [`grid_get_cell`](/en/tmux/latest/reference/c-function-grid_get_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1117)
- [`grid_peek_line`](/en/tmux/latest/reference/c-function-grid_peek_line/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1105)
- [`grid_string_cells_add_hyperlink`](/en/tmux/latest/reference/c-function-grid-c-grid_string_cells_add_hyperlink/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1157)
- [`grid_string_cells_code`](/en/tmux/latest/reference/c-function-grid-c-grid_string_cells_code/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1122)
- [`xmalloc`](/en/tmux/latest/reference/c-function-xmalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1102)
- [`xreallocarray`](/en/tmux/latest/reference/c-function-xreallocarray/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1144)

## Referenced declarations

- [`grid_line.cellsize`](/en/tmux/latest/reference/c-struct-grid_line-cellsize/) (attribute)
- [`grid_line.cellused`](/en/tmux/latest/reference/c-struct-grid_line-cellused/) (attribute)
- [`grid_cell.data`](/en/tmux/latest/reference/c-struct-grid_cell-data/) (attribute)
- [`utf8_data.data`](/en/tmux/latest/reference/c-struct-utf8_data-data/) (attribute)
- [`grid_cell.flags`](/en/tmux/latest/reference/c-struct-grid_cell-flags/) (attribute)
- [`grid_line.flags`](/en/tmux/latest/reference/c-struct-grid_line-flags/) (attribute)
- [`grid`](/en/tmux/latest/reference/c-struct-grid/) (struct)
- [`grid_cell`](/en/tmux/latest/reference/c-struct-grid_cell/) (struct)
- [`grid_default_cell`](/en/tmux/latest/reference/c-variable-grid_default_cell/) (attribute)
- [`GRID_FLAG_PADDING`](/en/tmux/latest/reference/c-define-tmux-h-grid_flag_padding/) (constant)
- [`GRID_FLAG_TAB`](/en/tmux/latest/reference/c-define-tmux-h-grid_flag_tab/) (constant)
- [`GRID_STRING_EMPTY_CELLS`](/en/tmux/latest/reference/c-define-tmux-h-grid_string_empty_cells/) (constant)
- [`GRID_STRING_ESCAPE_SEQUENCES`](/en/tmux/latest/reference/c-define-tmux-h-grid_string_escape_sequences/) (constant)
- [`GRID_STRING_TRIM_SPACES`](/en/tmux/latest/reference/c-define-tmux-h-grid_string_trim_spaces/) (constant)
- [`GRID_STRING_WITH_SEQUENCES`](/en/tmux/latest/reference/c-define-tmux-h-grid_string_with_sequences/) (constant)
- [`screen`](/en/tmux/latest/reference/c-struct-screen/) (struct)
- [`utf8_data.size`](/en/tmux/latest/reference/c-struct-utf8_data-size/) (attribute)
