MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / cJSON_CreateStringArray

Function cJSON_CreateStringArray

common/map_sdk/transmission/src/cJSON.cpp:875–888  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

873 return a;
874}
875cJSON *cJSON_CreateStringArray(const char **strings, int count) {
876 int i;
877 cJSON *n = 0, *p = 0, *a = cJSON_CreateArray();
878 for (i = 0; a && i < count; i++) {
879 n = cJSON_CreateString(strings[i]);
880 if (!i) {
881 a->child = n;
882 } else {
883 suffix_object(p, n);
884 }
885 p = n;
886 }
887 return a;
888}

Callers

nothing calls this directly

Calls 3

cJSON_CreateArrayFunction · 0.85
cJSON_CreateStringFunction · 0.85
suffix_objectFunction · 0.85

Tested by

no test coverage detected