logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

buffer_getline - read line from buffer

Description

       buffer_getline copies data from b to x[0], x[1], ..., x[len-1] until len bytes have been copied or a new-
       line character ('\n') is encountered.  That character is also copied.

       Note that line is not 0-terminated to make reading lines with 0-bytes possible through this interface.

Name

       buffer_getline - read line from buffer

Return Value

       Number of bytes read (without '\n'), -1 on error (setting errno).

See Also

buffer_init(3), buffer_feed(3), buffer_peek(3), buffer_seek(3), buffer(3)

                                                                                               buffer_getline(3)

Syntax

#include<libowfat/buffer.h>

       ssize_t buffer_getline(buffer* b,char* x,size_t len);

See Also