Files
bluelib/core/include/blue/core/stringstream.h

50 lines
1.6 KiB
C
Raw Normal View History

#ifndef BLUE_CORE_STRINGSTREAM_H_
#define BLUE_CORE_STRINGSTREAM_H_
2024-08-03 07:54:28 +01:00
#include <blue/core/macros.h>
2024-11-14 16:56:12 +00:00
#include <blue/core/misc.h>
#include <blue/core/status.h>
#include <blue/core/stream.h>
2024-08-03 07:54:28 +01:00
#include <stddef.h>
B_DECLS_BEGIN;
2024-08-03 07:54:28 +01:00
#define B_TYPE_STRINGSTREAM (b_stringstream_get_type())
B_DECLARE_TYPE(b_stringstream);
B_TYPE_CLASS_DECLARATION_BEGIN(b_stringstream)
B_TYPE_CLASS_DECLARATION_END(b_stringstream)
BLUE_API b_type b_stringstream_get_type(void);
BLUE_API b_stringstream *b_stringstream_create(void);
BLUE_API b_stringstream *b_stringstream_create_with_buffer(char *buf, size_t max);
BLUE_API b_status b_stringstream_reset(b_stringstream *strv);
BLUE_API b_status b_stringstream_reset_with_buffer(
b_stringstream *strv, char *buf, size_t max);
BLUE_API const char *b_stringstream_ptr(const b_stringstream *strv);
BLUE_API char *b_stringstream_steal(b_stringstream *strv);
2024-08-03 07:54:28 +01:00
BLUE_API size_t b_stringstream_get_length(const b_stringstream *strv);
#if 0
2024-11-14 16:56:12 +00:00
BLUE_API void b_stringstream_push_indent(b_stringstream *strv, int indent);
BLUE_API void b_stringstream_pop_indent(b_stringstream *strv);
2024-10-24 19:24:54 +01:00
2024-11-14 16:56:12 +00:00
BLUE_API b_status b_stringstream_add(b_stringstream *strv, const char *str);
BLUE_API b_status b_stringstream_addf(b_stringstream *strv, const char *format, ...);
BLUE_API b_status b_stringstream_addv(b_stringstream *strv, const char **strs);
BLUE_API b_status b_stringstream_addvf(
b_stringstream *strv, const char *format, va_list arg);
2024-11-14 16:56:12 +00:00
BLUE_API b_status b_stringstream_addvl(
2024-10-24 19:24:54 +01:00
b_stringstream *strv, const char **strs, size_t count);
2024-11-14 16:56:12 +00:00
BLUE_API b_status b_stringstream_add_many(b_stringstream *strv, ...);
#endif
B_DECLS_END;
2024-08-03 07:54:28 +01:00
#endif