From c135fed2f965bf73b7672e86d85ff8bf5f740a4c Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 6 Feb 2014 16:44:25 +0100 Subject: Two examples fixed. --- README.md | 6 +++--- 1 file 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. -- cgit v1.2.3-70-g09d2