MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / strncmp

Function strncmp

Kernel/src/string.cpp:141–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141int strncmp(const char* s1, const char* s2, size_t n)
142{
143 for (size_t i = 0; i < n; i++)
144 {
145 if (s1[i] != s2[i])
146 return s1[i] < s2[i] ? -1 : 1;
147 else if (s1[i] == '\0')
148 return 0;
149 }
150
151 return 0;
152}
153
154// strchr - Get pointer to first occurance of c in string s
155char* strchr(const char *s, int c)

Callers 10

FileViewMethod · 0.85
IsBMPFunction · 0.85
ParseLineFunction · 0.85
RunFunction · 0.85
OnFileOpenedFunction · 0.85
VerifyELFFunction · 0.85
SysCreateServiceFunction · 0.85
ResolveServiceNameMethod · 0.85
ReadDirectoryMethod · 0.85
FindDirMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected