Remove incorrect usage of :const: in documentation.
[python.git] / Python / pystrcmp.c
blob0012ef33bc3878e5f2b63298e3fbbd4cf6aba502
1 /* Cross platform case insenstive string compare functions
2 */
4 #include "Python.h"
6 int
7 PyOS_mystrnicmp(const char *s1, const char *s2, Py_ssize_t size)
9 if (size == 0)
10 return 0;
11 while ((--size > 0) && (tolower(*s1) == tolower(*s2))) {
12 if (!*s1++ || !*s2++)
13 break;
15 return tolower(*s1) - tolower(*s2);
18 int
19 PyOS_mystricmp(const char *s1, const char *s2)
21 while (*s1 && (tolower(*s1++) == tolower(*s2++))) {
24 return (tolower(*s1) - tolower(*s2));