1 /* Cross platform case insensitive string compare functions
7 PyOS_mystrnicmp(const char *s1
, const char *s2
, Py_ssize_t size
)
11 while ((--size
> 0) &&
12 (tolower((unsigned)*s1
) == tolower((unsigned)*s2
))) {
16 return tolower((unsigned)*s1
) - tolower((unsigned)*s2
);
20 PyOS_mystricmp(const char *s1
, const char *s2
)
22 while (*s1
&& (tolower((unsigned)*s1
++) == tolower((unsigned)*s2
++))) {
25 return (tolower((unsigned)*s1
) - tolower((unsigned)*s2
));