MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / stricomp

Function stricomp

Libraries/unrar/strfn.cpp:65–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63
64
65int stricomp(const char *s1,const char *s2)
66{
67#ifdef _WIN_ALL
68 return CompareStringA(LOCALE_USER_DEFAULT,NORM_IGNORECASE|SORT_STRINGSORT,s1,-1,s2,-1)-2;
69#else
70 while (toupper(*s1)==toupper(*s2))
71 {
72 if (*s1==0)
73 return 0;
74 s1++;
75 s2++;
76 }
77 return s1 < s2 ? -1 : 1;
78#endif
79}
80
81
82int strnicomp(const char *s1,const char *s2,size_t n)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected