asprintf() implementation
$ clib install littlstar/asprintf.c
#include <asprintf.h>
or
#include <asprintf/asprintf.h>
char *str = NULL;
char *fmt = "this is a %s";
int size = asprintf(&str, fmt, "string");
printf("%s\n", str); // this is a string
printf("%d\n", size); // 16
MIT