26 lines
1.0 KiB
C
26 lines
1.0 KiB
C
#ifndef BLUELIB_STRING_FORMATTER_H
|
|
#define BLUELIB_STRING_FORMATTER_H
|
|
|
|
#include <blue/object/string.h>
|
|
#include <stdarg.h>
|
|
|
|
typedef struct b_stringstream b_stringstream;
|
|
|
|
BLUE_API b_stringstream *b_stringstream_create(void);
|
|
BLUE_API b_string *b_stringstream_end(b_stringstream *f);
|
|
BLUE_API void b_stringstream_destroy(b_stringstream *f);
|
|
BLUE_API const b_string *b_stringstream_str(b_stringstream *f);
|
|
BLUE_API const char *b_stringstream_cstr(b_stringstream *f);
|
|
BLUE_API void b_stringstream_clear(b_stringstream *f);
|
|
|
|
BLUE_API void b_stringstream_push_indent(b_stringstream *f, int indent);
|
|
BLUE_API void b_stringstream_push_indent_abs(b_stringstream *f, int indent);
|
|
BLUE_API void b_stringstream_pop_indent(b_stringstream *f);
|
|
|
|
BLUE_API void b_stringstream_add(b_stringstream *f, const char *s);
|
|
BLUE_API void b_stringstream_addf(b_stringstream *f, const char *format, ...);
|
|
BLUE_API void b_stringstream_addvf(b_stringstream *f, const char *format, va_list arg);
|
|
BLUE_API void b_stringstream_add_str(b_stringstream *f, const b_string *str);
|
|
|
|
#endif
|