MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / __strncasecmp

Function __strncasecmp

emmy_debugger/src/util.cpp:6–17  ·  view source on GitHub ↗

glibc 函数

Source from the content-addressed store, hash-verified

4
5// glibc 函数
6int __strncasecmp(const char *s1, const char *s2, int n) {
7 if (n && s1 != s2) {
8 do {
9 int d = ::tolower(*s1) - ::tolower(*s2);
10 if (d || *s1 == '\0' || *s2 == '\0')
11 return d;
12 s1++;
13 s2++;
14 } while (--n);
15 }
16 return 0;
17}
18
19bool CompareIgnoreCase(const std::string &lh, const std::string &rh) {
20 std::size_t llen = lh.size();

Callers 1

CompareIgnoreCaseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected