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

Function cJSON_CreateString

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

Source from the content-addressed store, hash-verified

811 return item;
812}
813cJSON *cJSON_CreateString(const char *string) {
814 cJSON *item = cJSON_New_Item();
815 if (item) {
816 item->type = cJSON_String;
817 item->valuestring = cJSON_strdup(string);
818 }
819 return item;
820}
821cJSON *cJSON_CreateArray() {
822 cJSON *item = cJSON_New_Item();
823 if (item) item->type = cJSON_Array;

Callers 4

cJSON_CreateStringArrayFunction · 0.85
AddMethod · 0.85
ReplaceMethod · 0.85
AddAsFirstMethod · 0.85

Calls 2

cJSON_New_ItemFunction · 0.85
cJSON_strdupFunction · 0.85

Tested by

no test coverage detected