aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index 47d12b0..b3d9a4e 100644
--- a/README.md
+++ b/README.md
@@ -275,14 +275,14 @@ Because `sdscatprintf` is actually a function that concatenates strings all
you need is to concatenate your string to an empty string:
char *name = "Anna";
- int age = 2500;
+ int loc = 2500;
sds s;
- s = sdscatprintf(sdsempty(), "%s wrote %d lines of LISP\n", name, age);
+ s = sdscatprintf(sdsempty(), "%s wrote %d lines of LISP\n", name, loc);
You can use `sdscatprintf` in order to convert numbers into SDS strings:
int some_integer = 100;
- sds num = sdscatprintf(sdsempty(),"%s\n", some_integer);
+ sds num = sdscatprintf(sdsempty(),"%d\n", some_integer);
However this is slow and we have a special function to make it efficient.