1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/bl/blstring.h Fri Jan 27 10:30:16 2012 +0000
1.3 @@ -0,0 +1,18 @@
1.4 +#ifndef BL_STRING_H
1.5 +#define BL_STRING_H
1.6 +
1.7 +#include <unistd.h>
1.8 +#include <bl/types.h>
1.9 +
1.10 +typedef struct {
1.11 + char *str;
1.12 + size_t alloc,len;
1.13 +} String;
1.14 +
1.15 +String *string_new(const char *init);
1.16 +char *string_free(String *string,boolean free_segment);
1.17 +void string_append_c(String *string,char c);
1.18 +void string_append_len(String *string,const char *s,ssize_t len);
1.19 +#define string_append(string,s) string_append_len(string,s,-1)
1.20 +
1.21 +#endif /* BL_STRING_H */