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

Function acl_strncasecmp

lib_acl/src/stdlib/string/acl_strcasecmp.c:35–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35int acl_strncasecmp(const char *s1, const char *s2, size_t n)
36{
37 if (n != 0) {
38 const unsigned char *cm = maptolower,
39 *us1 = (const unsigned char *) s1,
40 *us2 = (const unsigned char *) s2;
41
42 do {
43 if (cm[*us1] != cm[*us2])
44 return (cm[*us1] - cm[*us2]);
45 if (*us1 == '\0')
46 break;
47 us1++;
48 us2++;
49 } while (--n != 0);
50 }
51 return (0);
52}
53
54int acl_strrncasecmp(const char *s1, const char *s2, size_t n)
55{

Callers 2

ncompareMethod · 0.85
http_util_req_newFunction · 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…