Crossfire Server, Trunk  R20513
stringbuffer.h
Go to the documentation of this file.
1 
22 #ifndef STRING_BUFFER_H
23 #define STRING_BUFFER_H
24 
25 #include "global.h"
26 
27 
31 typedef struct StringBuffer StringBuffer;
32 
33 
40 
46 
57 
70 
78 void stringbuffer_append_string(StringBuffer *sb, const char *str);
79 
87 void stringbuffer_append_printf(StringBuffer *sb, const char *format, ...);
88 
98 
106 
107 #endif
char * stringbuffer_finish(StringBuffer *sb)
Deallocate the string buffer instance and return the string.
Definition: stringbuffer.c:76
void stringbuffer_append_string(StringBuffer *sb, const char *str)
Append a string to a string buffer instance.
Definition: stringbuffer.c:95
Global type definitions and header inclusions.
StringBuffer * stringbuffer_new(void)
Create a new string buffer.
Definition: stringbuffer.c:57
void stringbuffer_append_stringbuffer(StringBuffer *sb, const StringBuffer *sb2)
Append the contents of a string buffer instance to another string buffer instance.
Definition: stringbuffer.c:131
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
Append a formatted string to a string buffer instance.
Definition: stringbuffer.c:104
size_t stringbuffer_length(StringBuffer *sb)
Return the current length of the buffer.
Definition: stringbuffer.c:154
const char * sstring
Strings that should be manipulated through add_string() and free_string().
Definition: global.h:40
sstring stringbuffer_finish_shared(StringBuffer *sb)
Deallocate the string buffer instance and return the string as a shared string.
Definition: stringbuffer.c:85
void stringbuffer_delete(StringBuffer *sb)
Totally delete a string buffer.
Definition: stringbuffer.c:71
A buffer that will be expanded as content is added to it.
Definition: stringbuffer.c:25