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

Function cJSON_strcasecmp

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

Source from the content-addressed store, hash-verified

37const char *cJSON_GetErrorPtr() { return ep; }
38
39static int cJSON_strcasecmp(const char *s1, const char *s2) {
40 if (!s1) return (s1 == s2) ? 0 : 1;
41 if (!s2) return 1;
42 for (; tolower(*s1) == tolower(*s2); ++s1, ++s2)
43 if (*s1 == 0) return 0;
44 return tolower(*(const unsigned char *)s1) - tolower(*(const unsigned char *)s2);
45}
46
47static void *(*cJSON_malloc)(size_t sz) = malloc;
48static void (*cJSON_free)(void *ptr) = free;

Callers 3

cJSON_GetObjectItemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected