_CP_mkstr

_CP_mkstr dynamically allocates a CPSTR* and fills it with a copy of cstring.

Syntax

CPSTR* _CP_mkstr(char* cstring)

This function is provided for convenience. The function _CP_mkstrl() is more efficient since it does not need to scan the string again to calculate the length.

NOTE

The CPSTR* created must be later freed with _CP_str_free.

Example(s)

CPSTR * s = _CP_mkstr("This is a string");

See Also

C Functions Overview, _CP_print, _CP_print_n