# grid_string_cells_code

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

## Parameters

- `lastgc` (`const struct grid_cell *`)
- `gc` (`const struct grid_cell *`)
- `buf` (`char *`)
- `len` (`size_t`)
- `flags` (`int`)
- `sc` (`struct screen *`)
- `has_link` (`int *`)

## Called by

- [`grid_string_cells`](/en/tmux/3.7c/reference/c-function-grid_string_cells/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1122)

## Calls

- [`grid_string_cells_add_code`](/en/tmux/3.7c/reference/c-function-grid-c-grid_string_cells_add_code/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1040)
- [`grid_string_cells_add_hyperlink`](/en/tmux/3.7c/reference/c-function-grid-c-grid_string_cells_add_hyperlink/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1072)
- [`grid_string_cells_bg`](/en/tmux/3.7c/reference/c-function-grid-c-grid_string_cells_bg/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1044)
- [`grid_string_cells_fg`](/en/tmux/3.7c/reference/c-function-grid-c-grid_string_cells_fg/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1038)
- [`grid_string_cells_us`](/en/tmux/3.7c/reference/c-function-grid-c-grid_string_cells_us/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1050)
- [`hyperlinks_get`](/en/tmux/3.7c/reference/c-function-hyperlinks_get/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1071)
- [`xsnprintf`](/en/tmux/3.7c/reference/c-function-xsnprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1025)

## Referenced declarations

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