MCPcopy Create free account
hub / github.com/SmingHub/Sming / memicmp

Function memicmp

Sming/System/stringutil.cpp:49–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49int memicmp(const void* buf1, const void* buf2, size_t len)
50{
51 auto p1 = static_cast<const unsigned char*>(buf1);
52 auto p2 = static_cast<const unsigned char*>(buf2);
53
54 if(p1 == p2) {
55 return 0;
56 }
57
58 int result = 0;
59 while(len-- && (result = tolower(*p1++) - tolower(*p2++)) == 0) {
60 }
61
62 return result;
63}
64
65char hexchar(unsigned char c)
66{

Callers 1

equalsIgnoreCaseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected