cp_string_read(3)

cp_string(3) cp_string cp_string(3)

NAME

cp_string_read - read a string from an open file descriptor

SYNOPSIS

#include <cprops/str.h>

cp_string *cp_string_read(int fd, int len);

DESCRIPTION

cp_string_read creates a new cp_string and reads up to len bytes from the open file descriptor fd, or if len is 0, reading continues until EOF is encountered.
cp_string_read returns on any error, regardless of the number of bytes read.

RETURN VALUE

a newly allocated cp_string structure or NULL if the read failed or the string could not be allocated.

SEE ALSO

cp_string_write(3)

MARCH 2006 libcprops