MCPcopy Index your code
hub / github.com/MapServer/MapServer / strncasecmp

Function strncasecmp

mapstring.c:298–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296
297#ifdef NEED_STRNCASECMP
298int strncasecmp(const char *s1, const char *s2, int len)
299{
300 register const char *cp1, *cp2;
301 int cmp = 0;
302
303 cp1 = s1;
304 cp2 = s2;
305 if ((!*cp1) || (!*cp2 )) {
306 return (0);
307 }
308 while(*cp1 && *cp2 && len)
309 {
310 if((cmp = (toupper(*cp1) - toupper(*cp2))) != 0)
311 return(cmp);
312 cp1++;
313 cp2++;
314 len--;
315 }
316
317 if(len == 0) {
318 return(0);
319 }
320 if(*cp1 || *cp2)
321 {
322 if (*cp1)
323 return(1);
324 else
325 return (-1);
326 }
327 return(0);
328}
329#endif
330
331#ifdef NEED_STRCASECMP

Callers 15

msStyleSetGeomTransformFunction · 0.85
msSLDGetGraphicSLDFunction · 0.85
msGetOutputFormatOptionFunction · 0.85
msSetOutputFormatOptionFunction · 0.85
msLoadQueryFunction · 0.85
msImageStartLayerFunction · 0.85
msBuildWMSLayerURLFunction · 0.85
msOGRUpdateStyleFunction · 0.85
loadMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected