aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2014-02-06 16:44:25 +0100
committerantirez <antirez@gmail.com>2014-02-06 16:44:25 +0100
commitc135fed2f965bf73b7672e86d85ff8bf5f740a4c (patch)
tree040deac2dd64bcf7ecd464531a2d0845fe16bf04
parent2a45d226587e1fc456e8213a897ee5369c0d072c (diff)
downloadsds-c135fed2f965bf73b7672e86d85ff8bf5f740a4c.tar.xz
Two examples fixed.
-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.