# _CP_mkstrl

_CP_mkstrl dynamically allocates a CPSTR*
of length expression and fills it with a copy of *cstring*.

## Syntax

```
CPSTR* _CP_mkstrl(char* cstring, int expression)
```
This function is more efficient that the similar _CP_mkstr() because _CP_mkstrl() does
not need to scan the *cstring*.

Note: The CPSTR*
created must be later freed with _CP_str_free.

## Example(s)

```
CPSTR * s = _CP_mkstr("Hi",2);
```

## See also

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

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