| 423 | |
| 424 | |
| 425 | int 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 | |
| 446 | int wcsnicomp(const wchar *s1,const wchar *s2,size_t n) |
no outgoing calls
no test coverage detected