diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-11-03 13:27:16 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-11-03 13:27:16 -0500 |
commit | 0e2552e84a621fdb70c4c91258224b8e515869ab (patch) | |
tree | 309342684f9899578b080913834ba69379593903 /dstring.h | |
parent | b3e0ae503374283232bfb2932904cf5412d118bf (diff) |
dstring: New dstrvprintf() function
Diffstat (limited to 'dstring.h')
-rw-r--r-- | dstring.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -22,6 +22,7 @@ #define BFS_DSTRING_H #include "util.h" +#include <stdarg.h> #include <stddef.h> /** @@ -130,6 +131,18 @@ 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. * * @param dstr |