diff options
| -rw-r--r-- | include/stc/cstr.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/stc/cstr.h b/include/stc/cstr.h index f7e7b8ad..5a6465ff 100644 --- a/include/stc/cstr.h +++ b/include/stc/cstr.h @@ -83,6 +83,10 @@ STC_API bool cstr_getdelim(cstr *self, int delim, FILE *fp); STC_API void cstr_erase(cstr* self, intptr_t pos, intptr_t len); STC_API void cstr_u8_erase(cstr* self, intptr_t bytepos, intptr_t u8len); STC_API cstr cstr_from_fmt(const char* fmt, ...); +// -- +// added by Tradam: +STC_API cstr cstr_from_vfmt(const char* fmt, va_list args); +// -- STC_API intptr_t cstr_append_fmt(cstr* self, const char* fmt, ...); STC_API intptr_t cstr_printf(cstr* self, const char* fmt, ...); STC_API cstr cstr_replace_sv(csview sv, csview search, csview repl, int32_t count); @@ -644,6 +648,16 @@ STC_DEF cstr cstr_from_fmt(const char* fmt, ...) { return s; } +STC_API cstr cstr_from_vfmt(const char* fmt, va_list args) +{ + cstr s = cstr_NULL; + //va_list args; + //va_start(args, fmt); + cstr_vfmt(&s, 0, fmt, args); + //va_end(args); + return s; +} + STC_DEF intptr_t cstr_append_fmt(cstr* self, const char* fmt, ...) { va_list args; va_start(args, fmt); |
