Create a new sds string starting from a null terminated C string. */
| 152 | |
| 153 | /* Create a new sds string starting from a null terminated C string. */ |
| 154 | sds sdsnew(const char *init) { |
| 155 | size_t initlen = (init == NULL) ? 0 : strlen(init); |
| 156 | return sdsnewlen(init, initlen); |
| 157 | } |
| 158 | |
| 159 | /* Duplicate an sds string. */ |
| 160 | sds sdsdup(const sds s) { |
no test coverage detected