# grid_string_cells_add_code

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L908
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-grid-c-grid_string_cells_add_code/

```c
static void grid_string_cells_add_code(char *buf, size_t len, u_int n, int *s, int *newc, int *oldc, size_t nnewc, size_t noldc, int flags)
```

## Parameters

- `buf` (`char *`)
- `len` (`size_t`)
- `n` (`u_int`)
- `s` (`int *`)
- `newc` (`int *`)
- `oldc` (`int *`)
- `nnewc` (`size_t`)
- `noldc` (`size_t`)
- `flags` (`int`)

## Called by

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

## Calls

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

## Referenced declarations

- [`grid_line.flags`](/en/tmux/3.7c/reference/c-struct-grid_line-flags/) (attribute)
- [`GRID_STRING_ESCAPE_SEQUENCES`](/en/tmux/3.7c/reference/c-define-tmux-h-grid_string_escape_sequences/) (constant)
