-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstr-builder.h
36 lines (23 loc) · 935 Bytes
/
str-builder.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
#ifndef _CSTUFF_STR_BUILDER_H_
#define _CSTUFF_STR_BUILDER_H_
/* -------------------------------------------------------------------------- */
struct str_builder {
char * c_str;
int size;
int length;
};
typedef struct str_builder * str_builder_t;
/* -------------------------------------------------------------------------- */
str_builder_t
str_builder_new( int size );
/* -------------------------------------------------------------------------- */
void
str_builder_free( str_builder_t self, int free_data );
/* -------------------------------------------------------------------------- */
int
str_builder_append( str_builder_t self, const char * c_str );
/* -------------------------------------------------------------------------- */
int
str_builder_append_chars( str_builder_t self, const char * chars, int size );
/* -------------------------------------------------------------------------- */
#endif