https://github.com/jwerle/asprintf.c
asprintf() implementation
https://github.com/jwerle/asprintf.c
Last synced: 6 months ago
JSON representation
asprintf() implementation
- Host: GitHub
- URL: https://github.com/jwerle/asprintf.c
- Owner: jwerle
- License: mit
- Created: 2014-06-03T12:42:37.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2020-10-01T20:23:09.000Z (over 5 years ago)
- Last Synced: 2024-04-14T09:54:35.692Z (about 2 years ago)
- Language: C
- Size: 10.7 KB
- Stars: 34
- Watchers: 24
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: History.md
- License: LICENSE
Awesome Lists containing this project
README
asprintf.c
==========
asprintf() implementation
## Install
```sh
$ clib install littlstar/asprintf.c
```
## Usage
```c
#include
```
or
```c
#include
```
## Example
```c
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