From e0ebdfb05aa543eac980920949bc993e1bec931b Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Tue, 21 Jul 2020 22:45:41 +0200 Subject: renamed cstr_makeFmt to cstr_from --- README.md | 2 +- examples/demos.c | 2 +- stc/cstr.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8a566ddb..b92813ac 100644 --- a/README.md +++ b/README.md @@ -195,7 +195,7 @@ int main() { printf("append: %s\n", s1.str); cstr_destroy(&s1); - CStr s2 = cstr_makeFmt("Index %d: %f", 123, 4.56); + CStr s2 = cstr_from("Index %d: %f", 123, 4.56); cstr_destroy(&s2); } ``` diff --git a/examples/demos.c b/examples/demos.c index c10cace9..f09e0fbc 100644 --- a/examples/demos.c +++ b/examples/demos.c @@ -19,7 +19,7 @@ void stringdemo1() cstr_replace(&cs, 0, "seven", "four"); printf("%s.\n", cs.str); - cstr_take(&cs, cstr_makeFmt("%s *** %s", cs.str, cs.str)); + cstr_take(&cs, cstr_from("%s *** %s", cs.str, cs.str)); printf("%s.\n", cs.str); printf("find: %s\n", cs.str + cstr_find(cs, 0, "four")); diff --git a/stc/cstr.h b/stc/cstr.h index 8380e8dd..c4101534 100644 --- a/stc/cstr.h +++ b/stc/cstr.h @@ -111,7 +111,7 @@ cstr_makeCopy(CStr s) { } static inline CStr -cstr_makeFmt(const char* fmt, ...) { +cstr_from(const char* fmt, ...) { CStr tmp = cstr_init; int len; va_list args; -- cgit v1.2.3