-
Notifications
You must be signed in to change notification settings - Fork 0
/
mstring.h
37 lines (27 loc) · 1.15 KB
/
mstring.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
34
35
36
37
/* Multi String Library
Copyright 2007-2014 PC GO Ld.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*/
#ifndef _MULTI_STRING_H
#define _MULTI_STRING_H
#include <stddef.h>
// type mstr or MultiString will define a pointer, it point to the first char of a multi string
typedef char *mstr;
typedef mstr MultiString;
size_t mstrsize(mstr);
mstr mstradd(mstr, const char *);
mstr mstradd_r(mstr *, const char *);
mstr mstrinit(const char *, size_t);
int mstrcount(mstr);
char *mstrindex(mstr, unsigned int);
mstr mstrcpy(mstr, mstr);
mstr mstrdup(mstr);
int putmss(mstr, unsigned int);
int putms(mstr);
mstr mkmstrl(const char *, ...);
mstr mkmstrv(char **);
void *malloc(size_t);
void *realloc(void *, size_t);
void free(void *);
#endif