sb_fprint

This commit is contained in:
2025-12-12 20:09:41 +01:00
parent 65b5905f00
commit 9398c0bf0e
4 changed files with 26 additions and 43 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/tcc -run
#define CIG_IMPL
#include "../cig.h"
int main(int argc, const char **argv) {
with_borrow(allocator) {
string_builder_t sb = sb_create(allocator);
sb_add_string(&sb, "Age: ");
sb_add_i64(&sb, 50);
sb_add_string(&sb, "\n");
sb_fprint(&sb, stdout);
}
return 0;
}