MCPcopy Index your code
hub / github.com/DaveGamble/cJSON / case_insensitive_strcmp

Function case_insensitive_strcmp

cJSON.c:133–154  ·  view source on GitHub ↗

Case insensitive string comparison, doesn't consider two NULL pointers equal though */

Source from the content-addressed store, hash-verified

131
132/* Case insensitive string comparison, doesn't consider two NULL pointers equal though */
133static int case_insensitive_strcmp(const unsigned char *string1, const unsigned char *string2)
134{
135 if ((string1 == NULL) || (string2 == NULL))
136 {
137 return 1;
138 }
139
140 if (string1 == string2)
141 {
142 return 0;
143 }
144
145 for(; tolower(*string1) == tolower(*string2); (void)string1++, string2++)
146 {
147 if (*string1 == '\0')
148 {
149 return 0;
150 }
151 }
152
153 return tolower(*string1) - tolower(*string2);
154}
155
156typedef struct internal_hooks
157{

Callers 1

get_object_itemFunction · 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…