strlist.h 545 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef __GWS__strlist_h__
  2. #define __GWS__strlist_h__
  3. typedef struct strlist {
  4. int len;
  5. int alloc;
  6. char** entries;
  7. } strlist;
  8. void strlist_free(strlist* sl, char freeSelf);
  9. void strlist_push(strlist* sl, char* e);
  10. strlist* strlist_new();
  11. void strlist_init(strlist* sl);
  12. strlist* strlist_clone(strlist* old);
  13. // remove and return the first entry
  14. char* strlist_shift(strlist* sl);
  15. char* join_str_list(char* list[], char* joiner);
  16. char** str_split(char* in, char* splitters);
  17. void free_strpp(char** l);
  18. #endif // __GWS__strlist_h__