# grid_string_cells_code

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

```c
static void grid_string_cells_code(const struct grid_cell *lastgc, const struct grid_cell *gc, char *buf, size_t len, int escape_c0)
```

## Parameters

- `lastgc` (`const struct grid_cell *`)
- `gc` (`const struct grid_cell *`)
- `buf` (`char *`)
- `len` (`size_t`)
- `escape_c0` (`int`)

## Called by

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

## Calls

- [`grid_string_cells_bg`](/en/tmux/3.2a/reference/c-function-grid-c-grid_string_cells_bg/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/grid.c#L918)
- [`grid_string_cells_fg`](/en/tmux/3.2a/reference/c-function-grid-c-grid_string_cells_fg/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/grid.c#L898)
- [`xsnprintf`](/en/tmux/3.2a/reference/c-function-xsnprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/grid.c#L885)

## Referenced declarations

- [`grid_cell.attr`](/en/tmux/3.2a/reference/c-struct-grid_cell-attr/) (attribute)
- [`GRID_ATTR_BLINK`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_attr_blink/) (constant)
- [`GRID_ATTR_BRIGHT`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_attr_bright/) (constant)
- [`GRID_ATTR_CHARSET`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_attr_charset/) (constant)
- [`GRID_ATTR_DIM`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_attr_dim/) (constant)
- [`GRID_ATTR_HIDDEN`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_attr_hidden/) (constant)
- [`GRID_ATTR_ITALICS`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_attr_italics/) (constant)
- [`GRID_ATTR_OVERLINE`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_attr_overline/) (constant)
- [`GRID_ATTR_REVERSE`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_attr_reverse/) (constant)
- [`GRID_ATTR_STRIKETHROUGH`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_attr_strikethrough/) (constant)
- [`GRID_ATTR_UNDERSCORE`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_attr_underscore/) (constant)
- [`GRID_ATTR_UNDERSCORE_2`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_attr_underscore_2/) (constant)
- [`GRID_ATTR_UNDERSCORE_3`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_attr_underscore_3/) (constant)
- [`GRID_ATTR_UNDERSCORE_4`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_attr_underscore_4/) (constant)
- [`GRID_ATTR_UNDERSCORE_5`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_attr_underscore_5/) (constant)
- [`grid_cell`](/en/tmux/3.2a/reference/c-struct-grid_cell/) (struct)
- [`nitems`](/en/tmux/3.2a/reference/c-define-tmux-h-nitems/) (constant)
