return c1 - c2;
}
+int stricmplen (const char *s1, const char *s2, int len)
+{
+ if (s1 == NULL) return s2 == NULL ? 0 : -(*s2);
+ if (s2 == NULL) return *s1;
+ char c1, c2;
+ int i = 0;
+ while ((c1 = tolower (*s1)) == (c2 = tolower (*s2)))
+ {
+ i++;
+ if (*s1 == '\0') break;
+ ++s1; ++s2;
+ if(i == len) break;
+ }
+ return c1 - c2;
+}
+