Permalink
Browse files

Added sdscatsds() to sds.c/h

  • Loading branch information...
antirez committed Nov 21, 2011
1 parent b1b98c6 commit 0b1531e50b06fc13426fa8604ad7bed248014705
Showing with 5 additions and 0 deletions.
  1. +4 −0 src/sds.c
  2. +1 −0 src/sds.h
View
@@ -156,6 +156,10 @@ sds sdscat(sds s, char *t) {
return sdscatlen(s, t, strlen(t));
}
+sds sdscatsds(sds s, sds t) {
+ return sdscatlen(s, t, sdslen(t));
+}
+
sds sdscpylen(sds s, char *t, size_t len) {
struct sdshdr *sh = (void*) (s-(sizeof(struct sdshdr)));
size_t totlen = sh->free+sh->len;
View
@@ -62,6 +62,7 @@ size_t sdsavail(sds s);
sds sdsgrowzero(sds s, size_t len);
sds sdscatlen(sds s, void *t, size_t len);
sds sdscat(sds s, char *t);
+sds sdscatsds(sds s, sds t);
sds sdscpylen(sds s, char *t, size_t len);
sds sdscpy(sds s, char *t);

0 comments on commit 0b1531e

Please sign in to comment.