man rbuf_split (Fonctions bibliothèques) - split an rbuf into an rlist of rbufs

NAME

rbuf_split - split an rbuf into an rlist of rbufs

SYNOPSIS

#include <roy.h>

RList * rbuf_split (const RBuf *string, char *separators, int max_splits);

DESCRIPTION

This call splits string on any character in the matching separators string into max_splits new rbufs. If maxsplits is -1 it splits on every occurance; if maxsplits is 0 it will return string as the only element in the returned rlist. If no character in separators is found the passed in string will be the only member of the returned rlist.

RETURN VALUE

A pointer to the newly created rlist will always be returned, except in the case of string being passed in as NULL, in which case NULL will be returned. The resultant rlist can be freed with the helper function, rlist_of_rbufs_free (RList * list).

ERRORS

A call to rlist_split(3) will never error.

FUNCTION

The rlist_split(3) api is implemented using a function.

SEE ALSO