cp_string_create(3)

cp_string(3) cp_string cp_string(3)

NAME

cp_string_create - string constructor function

SYNOPSIS

#include <cprops/str.h>

cp_string *cp_string_create(char *data, int len);

DESCRIPTION

cp_string_create creates a new cp_string by allocating ( len + 1) bytes and copying the first len bytes of data on to the cp_string structure.

RETURN VALUE

the newly allocated cp_string structure on success or NULL on failure. cp_string_create may fail on systems where malloc(3) might fail.

SEE ALSO

cp_string_dup(3), cp_string_cstrdup(3), cp_string_delete(3), malloc(3)

MARCH 2006 libcprops