aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2014-02-06 16:04:53 +0100
committerantirez <antirez@gmail.com>2014-02-06 16:04:53 +0100
commitc120b51d0f62141dbe4193d57321d83bef3434a8 (patch)
treeeeb2ef289372c9c247560e3b49e176b628407b18
parent3eac8046d94db36ae0ab172678d17f93effd6abe (diff)
downloadsds-c120b51d0f62141dbe4193d57321d83bef3434a8.tar.xz
README: fix markdown format for code after bullet list.
-rw-r--r--README.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/README.md b/README.md
index a7f2c51..6490159 100644
--- a/README.md
+++ b/README.md
@@ -121,6 +121,7 @@ There are many ways to create SDS strings:
* The `sdsnew` function creates an SDS string starting from a C null terminated string. We already saw how it works in the above example.
* The `sdsnewlen` function is similar to `sdsnew` but instead of creating the string assuming that the input string is null terminated, it gets an additional length parameter. This way you can create a string using binary data:
+
char buf[3];
sds mystring;
@@ -137,6 +138,7 @@ type. You can use the right `printf` specifier instead of casting.
* The `sdsempty()` function creates an empty zero-length string:
+
sds mystring = sdsempty();
printf("%d\n", (int) sdslen(mystring));
@@ -144,6 +146,7 @@ type. You can use the right `printf` specifier instead of casting.
* The `sdsdup()` function duplicates an already existing SDS string:
+
sds s1, s2;
s1 = sdsnew("Hello");