summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-07-21 22:45:41 +0200
committerTyge Løvset <[email protected]>2020-07-21 22:45:41 +0200
commite0ebdfb05aa543eac980920949bc993e1bec931b (patch)
treedbd7b18b62942dec4e7a6f87610c7a4911c2f27e
parent4724135f988ef5de088dbf4594451643aaec2bdf (diff)
downloadSTC-modified-e0ebdfb05aa543eac980920949bc993e1bec931b.tar.gz
STC-modified-e0ebdfb05aa543eac980920949bc993e1bec931b.zip
renamed cstr_makeFmt to cstr_from
-rw-r--r--README.md2
-rw-r--r--examples/demos.c2
-rw-r--r--stc/cstr.h2
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;