aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2015-01-19 21:22:31 +0100
committerJohannes Löthberg <johannes@kyriasis.com>2015-01-19 21:22:31 +0100
commitbaefce90597f27ddfd15da08889300bc62ed0bc4 (patch)
tree7a78f19ab103f6c6cc41ff2a78aa8f08adcc2edc
parentb656983022b945e0ea6d9fbb7f44b3b1735a60bf (diff)
downloadsds-baefce90597f27ddfd15da08889300bc62ed0bc4.tar.xz
sds.c: Update comments referencing sdsnew{,len}
-rw-r--r--src/sds.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sds.c b/src/sds.c
index 3f86e13..137fd5b 100644
--- a/src/sds.c
+++ b/src/sds.c
@@ -44,7 +44,7 @@
* The string is always null-termined (all the sds strings are, always) so
* even if you create an sds string with:
*
- * mystring = sdsnewlen("abc", 3");
+ * mystring = sdsnew("abc", 3");
*
* You can print the string with printf() as there is an implicit \0 at the
* end of the string. However the string is binary safe and can contain
@@ -242,7 +242,7 @@ sds sdsmapchars(sds s, const char *from, const char *to, size_t setlen) {
*
* Example:
*
- * s = sdsnew("Hello World");
+ * s = sdsauto("Hello World");
* sdsrange(s, 1, -1); => "ello World"
*/
void sdsrange(sds s, ptrdiff_t start, ptrdiff_t end) {
@@ -297,7 +297,7 @@ void sdstoupper(sds s) {
*
* Example:
*
- * s = sdsnew("AA...AA.a.aa.aHelloWorld :::");
+ * s = sdsauto("AA...AA.a.aa.aHelloWorld :::");
* s = sdstrim(s, "A. :");
* printf("%s\n", s);
*
@@ -325,7 +325,7 @@ void sdstrim(sds s, const char *cset) {
* This function is useful when the sds string is hacked manually in some
* way, like in the following example:
*
- * s = sdsnew("foobar");
+ * s = sdsauto("foobar");
* s[2] = '\0';
* sdsupdatelen(s);
* printf("%d\n", sdslen(s));