changed all "kjam" to "k8jam"
[k8jam.git] / kstrings.h
blobe3015c26add9b76cf8a1e61f05d25ec78af63f88
1 #ifndef KSTRINGS_H
2 #define KSTRINGS_H
3 /* Copyright David Abrahams 2004. Distributed under the Boost */
4 /* Software License, Version 1.0. (See accompanying */
5 /* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */
7 #include <stddef.h>
10 typedef struct {
11 char *value;
12 unsigned long size;
13 unsigned long capacity;
14 char opt[32];
15 #ifndef NDEBUG
16 char magic[4];
17 #endif
18 } tKString;
21 void kStringNew (tKString *s);
22 void kStringFree (tKString *s);
23 void kStringReserve (tKString *self, size_t capacity);
24 void kStringAppend (tKString *self, char const *rhs);
25 void kStringAppendRange (tKString *self, char const *start, char const *finish);
26 void kStringCopy (tKString *s, char const *rhs);
27 void kStringTruncate (tKString *self, size_t n);
28 void kStringPopBack (tKString *self);
29 void kStringPushBack (tKString *self, char x);
30 char kStringBack (tKString *self);
32 #ifndef NDEBUG
33 void kStringUnitTest (void);
34 #endif
37 #endif