author | ali <ali@juiblex.co.uk> |
Fri Jan 27 10:30:16 2012 +0000 (2012-01-27) | |
changeset 5 | f600b0d1fc5d |
parent 0 | gclib/gcstring.h@c2f4c0285180 |
permissions | -rw-r--r-- |
1 #ifndef BL_STRING_H
2 #define BL_STRING_H
4 #include <unistd.h>
5 #include <bl/types.h>
7 typedef struct {
8 char *str;
9 size_t alloc,len;
10 } String;
12 String *string_new(const char *init);
13 char *string_free(String *string,boolean free_segment);
14 void string_append_c(String *string,char c);
15 void string_append_len(String *string,const char *s,ssize_t len);
16 #define string_append(string,s) string_append_len(string,s,-1)
18 #endif /* BL_STRING_H */