Added sdscatsds() to sds.c/h

This commit is contained in:
antirez
2011-11-21 15:34:00 +01:00
parent 7e14a20801
commit 08a879af6e
2 changed files with 5 additions and 0 deletions

View File

@ -196,6 +196,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;