MCPcopy Create free account
hub / github.com/acl-dev/acl / cJSON_strcasecmp

Function cJSON_strcasecmp

lib_acl/samples/json/json5/cJSON.cpp:39–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

cJSON_GetObjectItemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…