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

Function cJSON_strcasecmp

cJSON.c:50–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

cJSON_GetObjectItemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected