Small, Fast S-Expression Library
cstring.h
Go to the documentation of this file.
1 
45 #ifndef __CSTRING_H__
46 #define __CSTRING_H__
47 
48 #include <stdlib.h>
49 
54 typedef struct __cstring {
58  char *base;
59 
63  size_t len;
64 
70  size_t curlen;
72 
73 #ifdef __cplusplus
74 extern "C" {
75 #endif /* __cplusplus */
76 
80  void sgrowsize(size_t s);
81 
87  CSTRING *snew(size_t s);
88 
98  CSTRING *sadd(CSTRING *s, char *a);
99 
108  CSTRING *saddch(CSTRING *s, char a);
109 
120 
125  char *toCharPtr(CSTRING *s);
126 
131  void sempty(CSTRING *s);
132 
136  void sdestroy(CSTRING *s);
137 
138 #ifdef __cplusplus
139 }
140 #endif /* __cplusplus */
141 
142 #endif /* __CSTRING_H__ */
char * toCharPtr(CSTRING *s)
void sdestroy(CSTRING *s)
CSTRING * sadd(CSTRING *s, char *a)
void sempty(CSTRING *s)
CSTRING * saddch(CSTRING *s, char a)
CSTRING * snew(size_t s)
CSTRING * strim(CSTRING *s)
struct __cstring CSTRING
void sgrowsize(size_t s)
Definition: cstring.h:54
size_t len
Definition: cstring.h:63
char * base
Definition: cstring.h:58
size_t curlen
Definition: cstring.h:70