MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / strcasecmp

Function strcasecmp

system/lib/libc/musl/src/string/strcasecmp.c:4–9  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include <ctype.h>
3
4int strcasecmp(const char *_l, const char *_r)
5{
6 const unsigned char *l=(void *)_l, *r=(void *)_r;
7 for (; *l && *r && (*l == *r || tolower(*l) == tolower(*r)); l++, r++);
8 return tolower(*l) - tolower(*r);
9}
10
11int __strcasecmp_l(const char *l, const char *r, locale_t loc)
12{

Callers 3

mainFunction · 0.85
bind_textdomain_codesetFunction · 0.85
__strcasecmp_lFunction · 0.85

Calls 1

tolowerFunction · 0.50

Tested by 1

mainFunction · 0.68