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

Function cJSON_strcasecmp

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

Source from the content-addressed store, hash-verified

46*/
47
48static int cJSON_strcasecmp(const char *s1, const char *s2)
49{
50 if (!s1)
51 return (s1 == s2) ? 0 : 1;
52 if (!s2)
53 return 1;
54 for (; tolower(*s1) == tolower(*s2); ++s1, ++s2)
55 if (*s1 == 0)
56 return 0;
57 return tolower(*(const unsigned char *)s1)
58 - tolower(*(const unsigned char *)s2);
59}
60
61static void *(*cJSON_malloc)(size_t sz) = malloc;
62static void (*cJSON_free)(void *ptr) = free;

Callers 3

cJSON_GetObjectItemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected