Create a new sds string starting from a null terminated C string. */
| 181 | |
| 182 | /* Create a new sds string starting from a null terminated C string. */ |
| 183 | sds sdsnew(const char *init) { |
| 184 | size_t initlen = (init == NULL) ? 0 : strlen(init); |
| 185 | return sdsnewlen(init, initlen); |
| 186 | } |
| 187 | |
| 188 | /* Duplicate an sds string. */ |
| 189 | sds sdsdup(const sds s) { |
no test coverage detected