initial commit
This commit is contained in:
30
core/include/blue/core/stringstream.h
Normal file
30
core/include/blue/core/stringstream.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef BLUELIB_CORE_STRINGSTREAM_H_
|
||||
#define BLUELIB_CORE_STRINGSTREAM_H_
|
||||
|
||||
#include <blue/core/status.h>
|
||||
#include <stddef.h>
|
||||
|
||||
typedef struct b_stringstream {
|
||||
char *ss_buf;
|
||||
size_t ss_len;
|
||||
size_t ss_max;
|
||||
unsigned char ss_alloc;
|
||||
} b_stringstream;
|
||||
|
||||
extern void b_stringstream_begin(b_stringstream *strv, char *buf, size_t max);
|
||||
extern void b_stringstream_begin_dynamic(b_stringstream *strv);
|
||||
|
||||
extern b_status b_stringstream_add(b_stringstream *strv, const char *str);
|
||||
extern b_status b_stringstream_addf(
|
||||
b_stringstream *strv,
|
||||
const char *format,
|
||||
...);
|
||||
extern b_status b_stringstream_addv(b_stringstream *strv, const char **strs);
|
||||
extern b_status b_stringstream_addvl(
|
||||
b_stringstream *strv,
|
||||
const char **strs,
|
||||
size_t count);
|
||||
extern b_status b_stringstream_add_many(b_stringstream *strv, ...);
|
||||
extern char *b_stringstream_end(b_stringstream *strv);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user