⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 strcasecmp.c

📁 mutt-1.5.12 源代码。linux 下邮件接受的工具。
💻 C
字号:
#include <ctype.h>#include <sys/types.h>/* UnixWare doesn't have these functions in its standard C library */int strncasecmp (char *s1, char *s2, size_t n){  register int c1, c2, l = 0;    while (*s1 && *s2 && l < n)  {    c1 = tolower ((unsigned char) *s1);    c2 = tolower ((unsigned char) *s2);    if (c1 != c2)      return (c1 - c2);    s1++;    s2++;    l++;  }  if (l == n)    return (int) (0);  else    return (int) (*s1 - *s2);}int strcasecmp (char *s1, char *s2){  register int c1, c2;    while (*s1 && *s2)  {    c1 = tolower ((unsigned char) *s1);    c2 = tolower ((unsigned char) *s2);    if (c1 != c2)      return (c1 - c2);    s1++;    s2++;  }                                                                             return (int) (*s1 - *s2);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -