LIBRARY
Run Command library (librc, -lrc)SYNOPSIS
In rc.h Ft RC_STRINGLIST * Fn rc_stringlist_new void Ft RC_STRING * Fn rc_stringlist_add RC_STRINGLIST *list const char *item Ft RC_STRING * Fn rc_stringlist_addu RC_STRINGLIST *list const char *item Ft bool Fn rc_stringlist_delete RC_STRINGLIST const char *item Ft void Fn rc_stringlist_free RC_STRINGLIST *list Ft void Fn rc_stringlist_sort RC_STRINGLIST *listDESCRIPTION
These functions provide an easy means of manipulating string lists. They are basically wrappers around TAILQ macros found in queue(3).Fn rc_stringlist_new creates a new list head to store the list.
Fn rc_stringlist_add adds a malloced copy of Fa item to Fa list . It returns a pointer to the new item on success, or NULL on failure and sets errno accordingly. Fn rc_stringlist_addu only works if Fa list does not already contain Fa item .
Fn rc_stringlist_delete removes and frees Fa item from Fa list , retuning true on success, otherwise false.
Fn rc_stringlist_sort sorts the Fa list according to C locale.
Fn rc_stringlist_free frees each item on Fa list and the Fa list itself.