gclib/gcstring.h
author ali <ali@juiblex.co.uk>
Wed Jan 25 19:33:43 2012 +0000 (2012-01-25)
changeset 2 cbd63f7ba40f
permissions -rw-r--r--
Don't test that gutcheck ignores paragraphs with only short lines
ali@0
     1
#ifndef GC_STRING_H
ali@0
     2
#define GC_STRING_H
ali@0
     3
ali@0
     4
#include <unistd.h>
ali@0
     5
#include <gclib/types.h>
ali@0
     6
ali@0
     7
typedef struct {
ali@0
     8
    char *str;
ali@0
     9
    size_t alloc,len;
ali@0
    10
} String;
ali@0
    11
ali@0
    12
String *string_new(const char *init);
ali@0
    13
char *string_free(String *string,boolean free_segment);
ali@0
    14
void string_append_c(String *string,char c);
ali@0
    15
void string_append_len(String *string,const char *s,ssize_t len);
ali@0
    16
#define string_append(string,s)		string_append_len(string,s,-1)
ali@0
    17
ali@0
    18
#endif /* GC_STRING_H */