diff options
Diffstat (limited to 'strbuf.h')
-rw-r--r-- | strbuf.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -187,4 +187,13 @@ extern int fprintf_ln(FILE *fp, const char *fmt, ...); char *xstrdup_tolower(const char *); +/* + * Create a newly allocated string using printf format. You can do this easily + * with a strbuf, but this provides a shortcut to save a few lines. + */ +__attribute__((format (printf, 1, 0))) +char *xstrvfmt(const char *fmt, va_list ap); +__attribute__((format (printf, 1, 2))) +char *xstrfmt(const char *fmt, ...); + #endif /* STRBUF_H */ |