MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / strncmp

Function strncmp

src/PowerPC_EABI_Support/src/MSL_C/MSL_Common/string.c:195–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193}
194
195int strncmp(const char* str1, const char* str2, size_t n)
196{
197 const u8* p1 = (u8*)str1 - 1;
198 const u8* p2 = (u8*)str2 - 1;
199 u32 c1, c2;
200
201 n++;
202
203 while (--n)
204 if ((c1 = *++p1) != (c2 = *++p2))
205 return (c1 - c2);
206 else if (!c1)
207 break;
208 return 0;
209}
210
211char* strchr(const char* str, int chr)
212{

Callers 2

DVDCompareDiskIDFunction · 0.85
PlayerHitAnimInitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected