5#ifndef STASIS_STRLIST_H
6#define STASIS_STRLIST_H
8typedef int (ReaderFn)(
size_t line,
char **);
57#define STRLIST_E_SUCCESS 0
58#define STRLIST_E_OUT_OF_RANGE 1
59#define STRLIST_E_INVALID_VALUE 2
60#define STRLIST_E_UNKNOWN 3
61extern int strlist_errno;
62const char *strlist_get_error(
int flag);
void strlist_append(struct StrList **pStrList, char *str)
Definition strlist.c:38
short strlist_item_as_short(struct StrList *pStrList, size_t index)
Definition strlist.c:557
void strlist_free(struct StrList **pStrList)
Definition strlist.c:17
void strlist_set(struct StrList **pStrList, size_t index, char *value)
Definition strlist.c:432
unsigned char strlist_item_as_uchar(struct StrList *pStrList, size_t index)
Definition strlist.c:532
unsigned short strlist_item_as_ushort(struct StrList *pStrList, size_t index)
Definition strlist.c:581
void strlist_sort(struct StrList *pStrList, unsigned int mode)
Definition strlist.c:381
int strlist_append_file(struct StrList *pStrList, char *path, ReaderFn *readerFn)
Definition strlist.c:71
struct StrList * strlist_copy(struct StrList *pStrList)
Definition strlist.c:308
char * strlist_item_as_str(struct StrList *pStrList, size_t index)
Definition strlist.c:497
int strlist_contains(struct StrList *pStrList, const char *value, size_t *index_of)
Definition strlist.c:166
void strlist_remove(struct StrList *pStrList, size_t index)
Definition strlist.c:330
long long strlist_item_as_long_long(struct StrList *pStrList, size_t index)
Definition strlist.c:706
unsigned int strlist_item_as_uint(struct StrList *pStrList, size_t index)
Definition strlist.c:631
char * strlist_item(struct StrList *pStrList, size_t index)
Definition strlist.c:484
struct StrList * strlist_init()
Definition strlist.c:829
int strlist_append_tokenize(struct StrList *pStrList, char *str, char *delim)
Definition strlist.c:224
float strlist_item_as_float(struct StrList *pStrList, size_t index)
Definition strlist.c:756
int strlist_append_tokenize_raw(struct StrList *pStrList, char *str, char *delim)
Definition strlist.c:256
void strlist_append_array(struct StrList *pStrList, char **arr)
Definition strlist.c:209
long double strlist_item_as_long_double(struct StrList *pStrList, size_t index)
Definition strlist.c:806
size_t strlist_count(struct StrList *pStrList)
Definition strlist.c:415
unsigned long strlist_item_as_ulong(struct StrList *pStrList, size_t index)
Definition strlist.c:681
char strlist_item_as_char(struct StrList *pStrList, size_t index)
Definition strlist.c:507
int strlist_appendf(struct StrList **pStrList, const char *fmt,...)
Definition strlist.c:289
void strlist_append_strlist(struct StrList *pStrList1, struct StrList *pStrList2)
Definition strlist.c:190
unsigned long long strlist_item_as_ulong_long(struct StrList *pStrList, size_t index)
Definition strlist.c:731
double strlist_item_as_double(struct StrList *pStrList, size_t index)
Definition strlist.c:781
void strlist_reverse(struct StrList *pStrList)
Definition strlist.c:392
int strlist_item_as_int(struct StrList *pStrList, size_t index)
Definition strlist.c:606
long strlist_item_as_long(struct StrList *pStrList, size_t index)
Definition strlist.c:656
int strlist_cmp(struct StrList *a, struct StrList *b)
Definition strlist.c:352