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:559
void strlist_free(struct StrList **pStrList)
Definition strlist.c:17
void strlist_set(struct StrList **pStrList, size_t index, char *value)
Definition strlist.c:433
unsigned char strlist_item_as_uchar(struct StrList *pStrList, size_t index)
Definition strlist.c:534
unsigned short strlist_item_as_ushort(struct StrList *pStrList, size_t index)
Definition strlist.c:583
void strlist_sort(struct StrList *pStrList, unsigned int mode)
Definition strlist.c:382
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:309
char * strlist_item_as_str(struct StrList *pStrList, size_t index)
Definition strlist.c:499
int strlist_contains(struct StrList *pStrList, const char *value, size_t *index_of)
Definition strlist.c:167
void strlist_remove(struct StrList *pStrList, size_t index)
Definition strlist.c:331
long long strlist_item_as_long_long(struct StrList *pStrList, size_t index)
Definition strlist.c:708
unsigned int strlist_item_as_uint(struct StrList *pStrList, size_t index)
Definition strlist.c:633
char * strlist_item(struct StrList *pStrList, size_t index)
Definition strlist.c:486
struct StrList * strlist_init()
Definition strlist.c:831
int strlist_append_tokenize(struct StrList *pStrList, char *str, char *delim)
Definition strlist.c:225
float strlist_item_as_float(struct StrList *pStrList, size_t index)
Definition strlist.c:758
int strlist_append_tokenize_raw(struct StrList *pStrList, char *str, char *delim)
Definition strlist.c:257
void strlist_append_array(struct StrList *pStrList, char **arr)
Definition strlist.c:210
long double strlist_item_as_long_double(struct StrList *pStrList, size_t index)
Definition strlist.c:808
size_t strlist_count(struct StrList *pStrList)
Definition strlist.c:416
unsigned long strlist_item_as_ulong(struct StrList *pStrList, size_t index)
Definition strlist.c:683
char strlist_item_as_char(struct StrList *pStrList, size_t index)
Definition strlist.c:509
int strlist_appendf(struct StrList **pStrList, const char *fmt,...)
Definition strlist.c:290
void strlist_append_strlist(struct StrList *pStrList1, struct StrList *pStrList2)
Definition strlist.c:191
unsigned long long strlist_item_as_ulong_long(struct StrList *pStrList, size_t index)
Definition strlist.c:733
double strlist_item_as_double(struct StrList *pStrList, size_t index)
Definition strlist.c:783
void strlist_reverse(struct StrList *pStrList)
Definition strlist.c:393
int strlist_item_as_int(struct StrList *pStrList, size_t index)
Definition strlist.c:608
long strlist_item_as_long(struct StrList *pStrList, size_t index)
Definition strlist.c:658
int strlist_cmp(struct StrList *a, struct StrList *b)
Definition strlist.c:353