MCPcopy Create free account
hub / github.com/antirez/botlib / sdscatlen

Function sdscatlen

sds.c:397–406  ·  view source on GitHub ↗

Append the specified binary-safe string pointed by 't' of 'len' bytes to the * end of the specified sds string 's'. * * After the call, the passed sds string is no longer valid and all the * references must be substituted with the new pointer returned by the call. */

Source from the content-addressed store, hash-verified

395 * After the call, the passed sds string is no longer valid and all the
396 * references must be substituted with the new pointer returned by the call. */
397sds sdscatlen(sds s, const void *t, size_t len) {
398 size_t curlen = sdslen(s);
399
400 s = sdsMakeRoomFor(s,len);
401 if (s == NULL) return NULL;
402 memcpy(s+curlen, t, len);
403 sdssetlen(s, curlen+len);
404 s[curlen+len] = '\0';
405 return s;
406}
407
408/* Append the specified null termianted C string to the sds string 's'.
409 *

Callers 9

sqlGenericQueryFunction · 0.85
makeHTTPGETCallWriterSDSFunction · 0.85
makeHTTPGETCallOptFunction · 0.85
makeGETBotRequestFunction · 0.85
sdscatFunction · 0.85
sdscatsdsFunction · 0.85
sdscatreprFunction · 0.85
sdssplitargsFunction · 0.85
sdsjoinsdsFunction · 0.85

Calls 3

sdslenFunction · 0.85
sdsMakeRoomForFunction · 0.85
sdssetlenFunction · 0.85

Tested by

no test coverage detected