sds
sds copied to clipboard
Allow sdsrange to make a string with length 0.
sdsrange(str, 0, -2) should result in an empty string.
For example
sds str = sdsnew("hello"); while (sdslen(str) > 0) str = sdsrange(str, 0, -2);
Would result in an inifinty loop before but will work as expected after this patch.