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

Function wcsicomp

Libraries/unrar/unicode.cpp:425–443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423
424
425int wcsicomp(const wchar *s1,const wchar *s2)
426{
427#ifdef _WIN_ALL
428 return CompareStringW(LOCALE_USER_DEFAULT,NORM_IGNORECASE|SORT_STRINGSORT,s1,-1,s2,-1)-2;
429#else
430 while (true)
431 {
432 wchar u1 = towupper(*s1);
433 wchar u2 = towupper(*s2);
434 if (u1 != u2)
435 return u1 < u2 ? -1 : 1;
436 if (*s1==0)
437 break;
438 s1++;
439 s2++;
440 }
441 return 0;
442#endif
443}
444
445
446int wcsnicomp(const wchar *s1,const wchar *s2,size_t n)

Callers 10

wcsicompcFunction · 0.85
PreprocessArgMethod · 0.85
ProcessSwitchMethod · 0.85
RestoreMethod · 0.85
UpdateExistingShortNameFunction · 0.85
SearchMethod · 0.85
CmpExtFunction · 0.85
NextVolumeNameFunction · 0.85
ExtractArchiveMethod · 0.85
ExtractCurrentFileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected