strcasecmp.c
Upload User: wstnjxml
Upload Date: 2014-04-03
Package Size: 7248k
Code Size: 0k
Category:

Windows CE

Development Platform:

C/C++

  1. #ifdef HAVE_CONFIG_H
  2. #include "config.h"
  3. #endif
  4. #include <ctype.h>
  5. int strcasecmp(const char *__s1, const char *__s2)
  6. {
  7. register unsigned char c1, c2;
  8. while (*__s1 && *__s2) {
  9. c1 = tolower(*__s1);
  10. c2 = tolower(*__s2);
  11. if (c1 != c2)
  12. return (int)(c1 - c2);
  13. __s1++;
  14. __s2++;
  15. }
  16. return (int)(*__s1 - *__s2);
  17. }