From 35dcefccfc2d90c7cb7e1092aa0f9132d8ca0de2 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Mon, 10 May 2021 09:32:40 +0200 Subject: cstr: Added cstr_replace_all(), cstr_append_fmt(). Renamed cstr_fmt() to cstr_assign_fmt(). Note that getdelim(), replace_all() and others may be placed in a separate using_cstr_utils() macro later. --- docs/cstr_api.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs') diff --git a/docs/cstr_api.md b/docs/cstr_api.md index 29e16b17..9d9bd36e 100644 --- a/docs/cstr_api.md +++ b/docs/cstr_api.md @@ -39,10 +39,12 @@ void cstr_clear(cstr* self); cstr* cstr_assign(cstr* self, const char* str); cstr* cstr_assign_s(cstr* self, cstr s); // cstr_take(self, cstr_clone(s)) cstr* cstr_assign_n(cstr* self, const char* str, size_t n); +cstr* cstr_assign_fmt(cstr* self, const char* fmt, ...); // printf() formatting cstr* cstr_append(cstr* self, const char* str); cstr* cstr_append_s(cstr* self, cstr s); cstr* cstr_append_n(cstr* self, const char* str, size_t n); // appends n characters +cstr* cstr_append_fmt(cstr* self, const char* fmt, ...); // printf() formatting void cstr_insert(cstr* self, size_t pos, const char* str); void cstr_insert_s(cstr* self, size_t pos, cstr s); @@ -51,6 +53,7 @@ void cstr_insert_n(cstr* self, size_t pos, const char* str, size_t n); void cstr_replace(cstr* self, size_t pos, size_t len, const char* str); void cstr_replace_s(cstr* self, size_t pos, size_t len, cstr s); void cstr_replace_n(cstr* self, size_t pos, size_t len, const char* str, size_t n); +size_t cstr_replace_all(cstr* self, const char* find, const char* replace); void cstr_erase(cstr* self, size_t pos); void cstr_erase_n(cstr* self, size_t pos, size_t n); -- cgit v1.2.3