SanderMertens / asprintf.c

asprintf() implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

asprintf.c

asprintf() implementation

install

$ clib install littlstar/asprintf.c

usage

#include <asprintf.h>

or

#include <asprintf/asprintf.h>

example

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

license

MIT

About

asprintf() implementation

License:MIT License


Languages

Language:C 93.0%Language:Makefile 7.0%