man buffer_get_token () - read token from buffer

NAME

buffer_get_token - read token from buffer

SYNTAX

#include <buffer.h>

int buffer_get_token(buffer* b,char* x,unsigned long int len, const char* charset,unsigned long int setlen);

DESCRIPTION

buffer_get_token copies data from b to x[0], x[1], ..., x[len-1] until len bytes have been copied or one of charset[0], charset[1], ..., charset[setlen] equals the last byte that was read. buffer_get_token returns the number of bytes read or -1 on error (setting errno appropriately).

SEE ALSO