cosmetic fixes
[k8jam.git] / strings.h
blobf11e0e77e438d4f437bde5f9d6e15732f5828f4c
1 #ifndef STRINGS_DWA20011024_H
2 # define STRINGS_DWA20011024_H
4 /* Copyright David Abrahams 2004. Distributed under the Boost */
5 /* Software License, Version 1.0. (See accompanying */
6 /* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */
8 # 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 ();
34 #endif
37 #endif