char* zlval_to_str(const zlval* v) { stringbuilder_t* sb = stringbuilder_new(); zlval_write_sb(sb, v); char* str = stringbuilder_to_str(sb); stringbuilder_del(sb); return str; }
int main(int argc, char* args[]) { struct stringbuilder* strbuilder = stringbuilder_new(); stringbuilder_append(strbuilder, (char*) "Hello "); stringbuilder_append(strbuilder, (char*) "World!"); printf("%s", stringbuilder_tostring(strbuilder)); return 0; }