Add DStr sprintf
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define UC_DSTR_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -134,6 +135,12 @@ size_t uc_dstr_replace(struct DStr *str, char f, char r);
|
||||
*/
|
||||
void uc_dstr_trim(struct DStr *str);
|
||||
|
||||
/** Append formatted string (just as sprintf)*/
|
||||
int uc_dstr_sprintf(struct DStr *str, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||
|
||||
/** va_list variant */
|
||||
int uc_dstr_vsprintf(struct DStr *str, const char *fmt, va_list ap_)__attribute__((format(printf,2,0)));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user