this repo has no description
at trunk 20 lines 600 B view raw view rendered
1# [fmt](https://github.com/tekknolagi/fmt) 2 3This very small formatting library provides two functions and a data type for 4when you need to heap-allocate and format a string at once. You could try and 5remember exactly how to do that dance, or you could include `fmt.h` and go on 6your way. 7 8```c 9// NUL-terminated string and length. Length does not include NUL. 10typedef struct str_size { 11 char *str; 12 size_t length; 13} str_size; 14 15str_size format(const char *fmt, ...); 16str_size formatv(const char *fmt, va_list args); 17void str_size_free(str_size str); // or you can free(str.str) 18``` 19 20Happy hacking.