2019-07-09 14:24:55 +09:00
|
|
|
#ifndef __util_h
|
|
|
|
#define __util_h
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2019-07-12 13:15:25 +09:00
|
|
|
|
|
|
|
typedef struct strset_s strset_t;
|
|
|
|
|
2022-07-26 21:14:28 +09:00
|
|
|
int count_strings (const char * const *str) __attribute__((pure));
|
2019-07-09 16:33:44 +09:00
|
|
|
void merge_strings (const char **out, const char * const *in1,
|
|
|
|
const char * const *in2);
|
2019-07-12 13:15:25 +09:00
|
|
|
void prune_strings (strset_t *strset, const char **strings, uint32_t *count);
|
2019-07-09 14:24:55 +09:00
|
|
|
|
2019-07-10 13:09:16 +09:00
|
|
|
strset_t *new_strset (const char * const *strings);
|
|
|
|
void del_strset (strset_t *strset);
|
2019-07-12 13:15:25 +09:00
|
|
|
void strset_add (strset_t *strset, const char *str);
|
2019-07-10 13:09:16 +09:00
|
|
|
int strset_contains (strset_t *strset, const char *str);
|
|
|
|
|
2019-07-09 14:24:55 +09:00
|
|
|
#endif//__util_h
|