MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / sdscatlen

Function sdscatlen

src/util/sds/sds.c:395–404  ·  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

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

Callers 5

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