12345678910111213141516171819202122232425262728 |
- #ifndef ARRAY_H
- #define ARRAY_H
- #include "lib.h"
- typedef struct {
- int size;
- int count;
- void **item;
- } Array;
- typedef enum { KEEP_SPLITER, REMOVE_SPLITER } SplitMode;
- extern void ArrayTest();
- extern Array* ArrayNew(int size);
- extern void ArrayFree(Array *array, FuncPtr1 freeFuncPtr);
- extern void ArrayAdd(Array *array, void *item);
- extern void ArrayPush(Array *array,void *item);
- extern void* ArrayPop(Array *array);
- extern void* ArrayPeek(Array *array);
- extern void* ArrayLast(Array *array);
- extern void ArrayEach(Array *array, FuncPtr1 f);
- extern int ArrayFind(Array *array, void *data, FuncPtr2 fcmp);
- extern Array* strsplit(char *str, char *spliter, SplitMode mode);
- #endif
|