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

Function sdsjoinsds

sds.c:1106–1115  ·  view source on GitHub ↗

Like sdsjoin, but joins an array of SDS strings. */

Source from the content-addressed store, hash-verified

1104
1105/* Like sdsjoin, but joins an array of SDS strings. */
1106sds sdsjoinsds(sds *argv, int argc, const char *sep, size_t seplen) {
1107 sds join = sdsempty();
1108 int j;
1109
1110 for (j = 0; j < argc; j++) {
1111 join = sdscatsds(join, argv[j]);
1112 if (j != argc-1) join = sdscatlen(join,sep,seplen);
1113 }
1114 return join;
1115}
1116
1117/* Wrappers to the allocators used by SDS. Note that SDS will actually
1118 * just use the macros defined into sdsalloc.h in order to avoid to pay

Callers

nothing calls this directly

Calls 3

sdsemptyFunction · 0.85
sdscatsdsFunction · 0.85
sdscatlenFunction · 0.85

Tested by

no test coverage detected