NeoMutt  2024-11-14-34-g5aaf0d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
wcscasecmp.c
Go to the documentation of this file.
1
29#include "config.h"
30#include <wchar.h>
31#include <wctype.h>
32
41int wcscasecmp(const wchar_t *a, const wchar_t *b)
42{
43 if (!a && !b)
44 return 0;
45 if (!a && b)
46 return -1;
47 if (a && !b)
48 return 1;
49
50 for (; *a || *b; a++, b++)
51 {
52 int i = towlower(*a);
53 if ((i - towlower(*b)) != 0)
54 return i;
55 }
56 return 0;
57}
int wcscasecmp(const wchar_t *a, const wchar_t *b)
Compare two wide-character strings, ignoring case.
Definition: wcscasecmp.c:41