-
Notifications
You must be signed in to change notification settings - Fork 302
/
stringlist.h
27 lines (15 loc) · 888 Bytes
/
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
#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 StringList *s, __in const char *Current);
const char *StringList_Get(__in StringList *s, __in int Subscript);
int StringList_Count(StringList *s);
_32BIT_INT StringList_Add(StringList *s, const char *str);
#define StringList_GetByOffset(s_ptr, offset) ((const char *)((s_ptr) -> Data + (offset)))
#define StringList_Clear(s_ptr) ((s_ptr) -> Used = 0, (s_ptr) -> Data != NULL && *((s_ptr) -> Data) = '\0')
const char *StringList_Find(StringList *s, const char *str);
#define StringList_Free(s_ptr) (ExtendableBuffer_Free((ExtendableBuffer *)(s_ptr)))
#endif // STRINGLIST_H_INCLUDED