From 0e2552e84a621fdb70c4c91258224b8e515869ab Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 3 Nov 2020 13:27:16 -0500 Subject: dstring: New dstrvprintf() function --- dstring.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'dstring.h') diff --git a/dstring.h b/dstring.h index 19fd6d7..b556313 100644 --- a/dstring.h +++ b/dstring.h @@ -22,6 +22,7 @@ #define BFS_DSTRING_H #include "util.h" +#include #include /** @@ -129,6 +130,18 @@ int dstrapp(char **str, char c); BFS_FORMATTER(1, 2) char *dstrprintf(const char *format, ...); +/** + * Create a dynamic string from a format string and a va_list. + * + * @param format + * The format string to fill in. + * @param args + * The arguments for the format string. + * @return + * The created string, or NULL on failure. + */ +char *dstrvprintf(const char *format, va_list args); + /** * Free a dynamic string. * -- cgit v1.2.3