forked from yaosj2k/dnsforwarder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stringlist.h
executable file
·33 lines (18 loc) · 1.04 KB
/
stringlist.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef STRINGLIST_H_INCLUDED
#define STRINGLIST_H_INCLUDED
#include "common.h"
#include "extendablebuffer.h"
typedef ExtendableBuffer StringList;
int StringList_Init(__in StringList *s, __in const char *ori, __in char Delimiter);
const char *StringList_GetNext(__in const StringList *s, __in const char *Current);
const char *StringList_Get(__in StringList *s, __in int Subscript);
int StringList_Count(StringList *s);
int32_t StringList_Add(StringList *s, const char *str, char Delimiter);
int32_t StringList_AppendLast(StringList *s, const char *str, char Delimiter);
void StringList_Catenate(StringList *des, StringList *src);
#define StringList_GetByOffset(s_ptr, offset) ((const char *)((s_ptr) -> Data + (offset)))
#define StringList_Clear(s_ptr) (ExtendableBuffer_Reset(s_ptr))
const char *StringList_Find(StringList *s, const char *str);
#define StringList_Free(s_ptr) (ExtendableBuffer_Free((ExtendableBuffer *)(s_ptr)))
const char **StringList_ToCharPtrArray(StringList *s);
#endif // STRINGLIST_H_INCLUDED