libprom
1.2.0
C based libraries to expose metrics in Promtheus exposition format
|
Go to the documentation of this file.
28 #ifndef PROM_STRING_BUILDER_I_H
29 #define PROM_STRING_BUILDER_I_H
35 typedef struct psb psb_t;
110 #endif // PROM_STRING_BUILDER_I_H
int psb_truncate(psb_t *self, size_t len)
Set the length of the buffered string of the given string builder to the given length and append '\0'...
int psb_add_str(psb_t *self, const char *str)
Append the given string to the buffered string of the given string builder.
size_t psb_len(psb_t *self)
Get the length of the buffered string of the given string builder.
char * psb_dump(psb_t *self)
Get a copy of the buffered string of the given string builder.
psb_t * psb_new(void)
Setup a new string builder.
int psb_add_char(psb_t *self, char c)
Append the given character to the buffered string of the given string builder.
int psb_clear(psb_t *self)
Free the allocated string buffer area of the given string builder, allocate a new one with a default ...
char * psb_str(psb_t *self)
Get a reference to the buffered string.
int psb_destroy(psb_t *self)
Destroys the given string builder.