MCPcopy Create free account
hub / github.com/Bwar/CJsonObject / cJSON_CreateStringArray

Function cJSON_CreateStringArray

cJSON.c:1092–1106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1090 return a;
1091}
1092cJSON *cJSON_CreateStringArray(const char **strings, int count)
1093{
1094 int i;
1095 cJSON *n = 0, *p = 0, *a = cJSON_CreateArray();
1096 for (i = 0; a && i < count; i++)
1097 {
1098 n = cJSON_CreateString(strings[i]);
1099 if (!i)
1100 a->child = n;
1101 else
1102 suffix_object(p, n);
1103 p = n;
1104 }
1105 return a;
1106}
1107

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