MCPcopy Create free account
hub / github.com/OpenDriveLab/OpenLane / cJSON_CreateString

Function cJSON_CreateString

eval/LANE_evaluation/lane2d/src/cJSON.c:1027–1036  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1025 return item;
1026}
1027cJSON *cJSON_CreateString(const char *string)
1028{
1029 cJSON *item = cJSON_New_Item();
1030 if (item)
1031 {
1032 item->type = cJSON_String;
1033 item->valuestring = cJSON_strdup(string);
1034 }
1035 return item;
1036}
1037cJSON *cJSON_CreateArray()
1038{
1039 cJSON *item = cJSON_New_Item();

Callers 4

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

Calls 2

cJSON_New_ItemFunction · 0.85
cJSON_strdupFunction · 0.85

Tested by

no test coverage detected