#ifndef TSTRING_GUARD
|
|
#define TSTRING_GUARD
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
|
|
typedef struct{
|
|
size_t size;
|
|
char data[1];
|
|
}tstring;
|
|
|
|
tstring* tstring_create(size_t);
|
|
tstring* tstring_copy(tstring*);
|
|
tstring* cstring_to_tstring(char*);
|
|
tstring* integer_to_tstring(int64_t);
|
|
tstring* tstring_concatenate(tstring*,tstring*);
|
|
tstring* tstring_n_concatenate(size_t count, ...);
|
|
int tstring_n_write(FILE* file, size_t count, ...);
|
|
tstring* tstring_n_compose(const char* count, ...);
|
|
void tstring_destroy(tstring*);
|
|
|
|
#endif // TSTRING_GUARD
|