# _CP_si_

_CP_si_ converts a CPSTR into an integer.

## Syntax

```
int _CP_si_(CPSTR * string)
```

## Example(s)

```
/* Displays "3". */

CPSTR * s = _CP_mkstr("3.12345");
int i;
i = _CP_si_(s);
_CP_unix_env();

printf("%d\n", i);
_CP_str_free(s);
```

## See also

- [C functions overview](https://d3codex.com/cfunctions/c-functions-overview/)

---
Source: https://d3codex.com/cfunctions/cp-si/ - part of the D3Codex reference.
